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.6 and pythonista
-
Is it possible to use pythonista with python 3.6? I’m trying to use it with ‘Learn python 3 the hard way’ but it doesn’t work on the new format commands such as
print( f" Here's your file {filename}:")
It also struggles with argv commands saying there are not enough arguments. Has anyone used it successfully with python 3.6 or is there an update somewhere that I’m missing?
-
Python 3.6 support isn't ready yet, but it's coming soon, i.e. you cannot use Python 3.6 in Pythonista right now.
-
By the way, the beta version has already included Python 3.6 for a while, and it's working quite well. I haven't noticed any problems specific to 3.6. (There's of course no guarantee that anything from the beta will be in the next release update, but it seems very likely.)
With "argv commands" do you mean scripts where you would pass extra arguments in the shell like
python3 myscript.py arg1 arg2 arg3
? To do that in Pythonista, you can long-tap on the play button, which brings up a popup with extra options for running your script. In the text field at the top you can type arguments for your script. (You only need to type the arguments, likearg1 arg2 arg3
, not a fullpython3
command.)Also, a small note regarding LPTHW - you should be aware that the author has some strong opinions about Python 3. Until recently the book was Python 2 only and was extremely negative about Python 3. I don't have the full Python 3 edition, so I don't know how much that has changed. Just be aware that the author's opinion isn't that of the Python community in general.
-
For a potential f-strings workaround, check out https://forum.omz-software.com/topic/4355/scripter-pythonista-ui-animation-framework-built-on-ui-view-update/9
-
ok @ccc, i tried future_fstrings, and it does work, provided you:
- pip install tokenize_rt
- download future_fstrings.py, and copy into site packages
- in your pythonista_startup, include the following:
import future_fstrings future_fstrings.register()
pretty neat idea (registering a custom encoding with
codecs
, which gets called on the file to transform it before it gets executed).