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
-
You can't stop the script if an input() is running
-
Also why does webbrowser open MobileSafari and not the inapp browser?
-
Got the new Beta, all the issues I reported are already fixed, thanks a lot for the quick turn around
-
Thanks for the feedback, everyone!
I've just uploaded a new build (300003) to address a lot of the bugs you reported. See the release notes in TestFlight for details.
The syntax highlighter considers the u prefix of unicode literals (as in u"üñìcødé") part of the string, but not the b prefix of bytes literals (as in b"PK\x03\x04").
In the interactive console, the tab key on hardware keyboards does not expand the first autocompletion suggestion, unlike in the editor.
I have both of these on my todo list. Haven't looked at the double
~~
issue yet. -
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
-