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
-
@JonB In Pythonista 3, probably yes. The two runtimes are always running in the background, though you can only interact with one through the interactive prompt. I'd assume that you can use the C API to exec code in the other one while it's inactive.
-
@dgelessus , does that mean one runtime could run say bottle or flask for example and stay alive so you could use the other runtime to code against it? maybe a stupid question. Just thinking out aloud
-
Possibly... I don't know how the two runtimes run threading-wise. The startup scripts are executed one after the other, so perhaps you can only run code in one interpreter at a time.
-
@dgelessus , ok thanks. Just interesting if can be done. I am sure with other things also
-
@JonB Definitely possible.
>>> print(".".join(str(x) for x in sys.version_info)) 3.5.1.final.0 Out[19] = None >>> state = py2.PyGILState_Ensure() >>> py2.PyRun_SimpleString(b"import sys\nprint('Hello from ' + '.'.join(str(x) for x in sys.version_info))") Hello from 2.7.5.final.0 Out[20] = 0 >>> py2.PyGILState_Release(state) Out[21] = None
-
On iPhone, the scrollbar can slide behind the tab button. The scrollbar should probably go on top to remain visible.
-
@omz, sorry if this has be talked about. But, for those running the 2 betas, do we need to make sure we have switched over from the 2.7 beta to the 3 beta along with copying the code over before the 2.7 beta expires? Or are you releasing another 2.7 beta?
-
@Phuket2 I think I'll make another 2.0.1 beta in the meantime, but even if it expires, you should be able to access your files via Pythonista 3 (launching the app wouldn't work, but your files wouldn't disappear).
-
@omz , ok. Thanks. Good to know
-
New to the beta:
Is it so that you can't define functions in the console, or am I doing something wrong?
-
@gebloom That's a known issue, still on my todo list.
-
On the latest beta once I press the split screen (editor and console) icon on the top left (half blank half shade) it will open the split screen but the icon will disappear and there is no way to set the console or editor to full screen again, it will be split screen forever. I did not find a way to fix it, I had to uninstall the app and install it again.
-
@OI
Oops, sorry! If you have a split-screen capable iPad (Air 2 or later), you can work around this by putting Pythonista in split-screen mode (this will automatically undock the console).Otherwise, you can run the following code and restart the app afterwards (just as a temporary workaround until I can get a new build up):
from objc_util import ObjCClass ObjCClass('NSUserDefaults').standardUserDefaults().setBool_forKey_(False, 'DockedAccessoriesPanel')
-
Example Music Stats.py does not run. Throws an Attribute Error on the NSBundle call. Can be fixed by changing
NSBundle.bundleWithPath('/System/Library/Frameworks/MediaPlayer.framework').load()
to
ObjCClass('NSBundle').bundleWithPath_('/System/Library/Frameworks/MediaPlayer.framework').load()
-
@wradcliffe I already fixed that, but the sample code doesn't update automatically during the beta (if you select "Restore Examples" from the settings, you should get the correct version).
-
@omz I have an iPad Pro, I love the Split-Screen mode, thanks for that.
I also noticed that the Extended Keyboard with numbers option does not apply for the iPad Pro because the keyboard already has numbers.
-
On 300008 all additional keyboards works fine again. I am also happy with the number keyboard on iPad Pro (2015). Most time I am using the Apple Smartkeyboard and in this case the number row of additional keyboard helps very much!
-
@dgelessus @omz Apologies for my delays replies. Been very busy.
Here is my traceback error for the dropbox moduleGetting request token... >>> import traceback >>> traceback.print_last() Traceback (most recent call last): File "/var/containers/Bundle/Application/A9B030F9-D4F9-4655-98F2-138229441753/Pythonista3.app/Frameworks/PythonistaKit3.framework/pylib/site-packages/dropbox/session.py", line 325, in _parse_token key = params['oauth_token'][0] KeyError: 'oauth_token' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/private/var/mobile/Containers/Shared/AppGroup/E1A188D0-4D1B-4343-8EB4-AB6ECC41AA73/Pythonista3/Documents/dropbox_sync/dropboxlogin.py", line 55, in <module> main() File "/private/var/mobile/Containers/Shared/AppGroup/E1A188D0-4D1B-4343-8EB4-AB6ECC41AA73/Pythonista3/Documents/dropbox_sync/dropboxlogin.py", line 50, in main dropbox_client = get_client() File "/private/var/mobile/Containers/Shared/AppGroup/E1A188D0-4D1B-4343-8EB4-AB6ECC41AA73/Pythonista3/Documents/dropbox_sync/dropboxlogin.py", line 40, in get_client access_token = get_access_token() File "/private/var/mobile/Containers/Shared/AppGroup/E1A188D0-4D1B-4343-8EB4-AB6ECC41AA73/Pythonista3/Documents/dropbox_sync/dropboxlogin.py", line 32, in get_access_token request_token = get_request_token() File "/private/var/mobile/Containers/Shared/AppGroup/E1A188D0-4D1B-4343-8EB4-AB6ECC41AA73/Pythonista3/Documents/dropbox_sync/dropboxlogin.py", line 21, in get_request_token request_token = sess.obtain_request_token() File "/var/containers/Bundle/Application/A9B030F9-D4F9-4655-98F2-138229441753/Pythonista3.app/Frameworks/PythonistaKit3.framework/pylib/site-packages/dropbox/session.py", line 222, in obtain_request_token self.request_token = self._parse_token(response.read()) File "/var/containers/Bundle/Application/A9B030F9-D4F9-4655-98F2-138229441753/Pythonista3.app/Frameworks/PythonistaKit3.framework/pylib/site-packages/dropbox/session.py", line 327, in _parse_token raise ValueError("'oauth_token' not found in OAuth request.") ValueError: 'oauth_token' not found in OAuth request.
It appears to be a simple case of using a bytestring as the dictionary lookup key, but according to this, there are more issues than just that and ultimately dropbox module v1 is incompatible with python3. The new SDK however (module v2) is compatible and backward compatible with old code too, so it should be a simple case of updating the module in pythonista. As I mentioned in my first post, I'm not sure I can do that myself, I've been reading around about installing modules with pipista etc, but it seems like its pretty hit and miss and I don't have heaps of time to spend messing around getting dropbox syncing to work.
Should I assume that the module will be updated at some point before P3 is released from beta, and I just need to wait? Would it be possible for me to update the module myself? How would one do that?
-
In beta 300008 I am missing the "Hamburger Symbol" if I am editing a PYUI File in the upper left corner!
-
@Skeo
install stash, then from stash, usepip install dropbox