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.
Pythonista 3
-
@cook thank you for clarification.
-
I've just installed Pythonista 3 and I only begin to (try to) run my scripts in Python3, after conversion via 2to3.
The first script I try is a script performing a backup of all my scripts on Dropbox, using the dropbox standard module.dropbox_client.put_file('/Pythonista/Backup3.zip',fil,overwrite=True)
The script stops at this line with error "ascii codec can't decode byte 0xaf in position 11: ordinal not in..." (dropbox.py, client.py, decode, ascii...)
I'm afraid I'll meet this kind of errors during my multiple conversions.
Thanks for your very appreciated help. -
@omz Congratulations of two great releases today!! Thanks massively for your commitment and craftsmanship. These tools have become so powerful yet so delightful. This community is extremely grateful to you for your dedication over the years.
-
you might try using one of the examples in the dropbox sdk
For example
https://github.com/dropbox/dropbox-sdk-python/tree/master/example/back-up-and-restoreAlternatively, set your default interpreter to 2.7, or add #!python2 at the top of your main script to run it in the 2.7 interpreter.
-
@jonB thanks, both solutions are ok.
I'll keep v3 as default setting and force v2 only for scripts where I'll get problems.
But, for info, I use all Pythonista standard code and samples for accessing Dropbox, thus I don't understand this kind of decode errors. -
Solution found: file to be put must be open in binary mode!
And the script runs without error in Python 3... -
@cook Hmmm I haven't investigated it in detail but I installed P 3, started it and found the files from P 2. After that I deleted P 2 and the files are still available in P 3.
-
@skrohmer The data container is shared between the two apps. There's no way for the system to know which files belong to which, so it's only deleted if you delete all apps in the app group (i.e. both versions of Pythonista).
-
@omz that's good to know...! Thanks!
-
Can you confirm that the numpy version for both python 2.7 and 3.5 are still at 1.8 ? I examine the two folders, and did imports and np.version.version from 2.7 and 3.5 and got the same version information. If so, is it possible to upgrade to at least 1.9 or is that due for a later release/
I do love the version and I am glad to see it move to pythonista... thanks -
import numpy print(numpy.__version__) # 1.8.0 on both Pythonista 2.1 and 3.0
-
@ccc yes that is what I got as well, I was just wondering why numpy wasn't upgraded as well, there are a few things that would have been useful to have upgraded like np.unique https://github.com/numpy/numpy/blob/1429c606643d1ad305e710c4a31cb6f398d04c53/numpy/lib/arraysetops.py
-
I just bought the App for the first time (didn't own previous version). Hope this is planned for the near future as it's important for those that need it. I am referring to numpy...