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
-
async
,await
andnonlocal
are only suggested in the editor, not the interactive promptnonlocal
is also missing syntax highlighting- Exceptions are only suggested in the interactive prompt, not the editor
-
async, await and nonlocal are only suggested in the editor, not the interactive prompt
True, I actually doubt that these will see much use in the REPL though.
nonlocal is also missing syntax highlighting
Ah, missed that.
Exceptions are only suggested in the interactive prompt, not the editor
Works for me. Note that exceptions are only suggested after the
raise
andexcept
keywords though (would add too much clutter otherwise, especially as there are a lot more built-in exception types in Python 3). -
@omz said:
Works for me. Note that exceptions are only suggested after the
raise
andexcept
keywords though (would add too much clutter otherwise, especially as there are a lot more built-in exception types in Python 3).Ah okay, I just typed somewhere in a file and they didn't come up. To be honest I'm not a big fan of hiding things that the user "probably" won't need - I understand that all the exception names clutter up the suggestions, but what if I do want to use an exception in a non-"normal" place? What if I want to extend an exception class, or do an
isinstance
check, or anassertRaises
, or create an exception without raising it right away?Now I noticed that Pythonista 2 behaves the same way. I always thought that exception names were never suggested and that it was a bug related to how they are avaliable both as builtins and via the
exceptions
module.At the moment the autocompletion ignores case completely, perhaps it would help with the clutter if casing was taken into account. Or change the ordering of names based on whether their case matches what was typed - so (assuming you did
import sys
previously) if you typesy
you getsys
,SystemError
,SystemExit
, but when you typeSy
you getSystemError
,SystemExit
,sys
. -
@dgelessus said:
At the moment the autocompletion ignores case completely, perhaps it would help with the clutter if casing was taken into account. Or change the ordering of names based on whether their case matches what was typed - so (assuming you did import sys previously) if you type sy you get sys, SystemError, SystemExit, but when you type Sy you get SystemError, SystemExit, sys.
Interesting idea, I'll have to think about that.
-
@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