Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Python 3.x Progress Update
-
@omz Does Pythonista 3 support Type Hints?
-
@OI You can annotate your functions with type hints if you like (the syntax and the
typing
module are supported), but Pythonista itself doesn't do anything with them. -
@omz
Thank you for updating the Beta3.
Now I was able to migrate a program to Python3 in just a few minutes. And there was a hint if I had mixed Spaces and Tabs!
And the Short-Cuts are back now! -
@wnMark There's an option under the indentation settings to show mixed indentation in the editor, i. e. when you indent with tabs, spaces are made visible, and if you indent with spaces, tabs are made visible.
-
@ccc async, await, asyncio etc are not really about threading or multiprocessing. It is more like co-routines, running everything in a single thread and handing control to the next routine at defined scheduling points (the await statements).
Georg -
-
@fguillier That was an oversight, thanks for letting me know. The latest build includes
wsgiref
now. -
this is more of a python 3.x question, but whenever I try using urllib.request.urlopen, I get an SSL CERTIFICATE error. Is the p3 version properly hooked into the platform certificate provider?
-
@JonB Looks like the certificate file isn't hooked up correctly, will be fixed in the next build, I'd recommend using
requests
in the meantime (comes with a bundled certificate file and works). -
-
@JonB Workaround:
import os cert_path = os.path.join(os.path.split(os.__file__)[0], 'site-packages/requests/cacert.pem') os.environ['SSL_CERT_FILE'] = cert_path
-
-
Using the console in Sharing extension has an input area which is shown to high above the keyboard. (iPad Air 2 Landscape)
-
@omz
Thank you again for the newest beta for Pythonista 3.This is not new:
The additional keyboard disappears going to search line. I would appreciate the additional keyboard in search! -
@omz Odd visual bug: Start with the file list open. "Flick" the editor to the left so it has enough "momentum" to fully close on its own. After letting go, but while it is still sliding, grab the editor again and slide the file list open. Now the file list is completely black. (If you don't understand what exactly I mean, try flicking the editor left and right quickly a few times without letting the file list fully close, then you'll probably see what I mean.)
-
That also happens if you close(slide to the left)and you press the up left corner(where the button is when the files are not shown
-
One suggestion: use modernize rather than lib2to3, as this will result in code using six that is compatible with both pythonista versions. This should also be included in p2, to help folks write compatible code so we don't become TOO fractured.
Alternatively, python-future seems to result in clean code when python 2.6 or earlier does bot need to be supported, which seems to be the case here. (in which case futurize and pasteurize allow conversion of existing p2 or p3 to a compatible codebase). This might be a good addition to both versions.
-
Hey guys! Does anyone know what the url scheme looks like for accessing a file in the Pythonista 2 folder from Pythonista 3?
/**** UPDATE **** :
Thanks to the comments below @Webmaster4o and @dgelessus .
Tried
pythonista3://{{../../Documents/aaaFiveStarsProduction/destinationator.py}}?action=run
as per your suggestions... and that did the trick.
****************/
-
The URL scheme starts in documents, I think. You'd have to do
../Pythonista/Documents
. I don't know if this works, though. You could alsoos.symlink
a folder inside Pythonista3'sDocuments
to that of Pythonista 2 -
Pythonista 2's Documents folder is at
pythonista3://../../Documents
and Pythonista 3's Documents folder is atpythonista://../Pythonista3/Documents
. The starting location is always the app's ownDocuments
folder, which is why you need to go two steps up with Pythonista 3 and only one step up with Pythonista 2.