Forum Archive

Pythonista 3 runs Pythonista 2 startup script

lukaskollmer

I just noticed that: When I launch Pythonista 3, the pythonista_startup.py file in the Pythonista 2 site-packages folder will be executed.

Is there a reason for that?

I've done some tests:
- Pythonista 2 runs only the its ownpythonista_startup file
- Pythonista 3 first runs its ownpythonista_startup file, then the one in the Pythonista 2 site-packages folder

dgelessus

As far as I can tell, Pythonista 3 loads both Python runtimes at startup. The Python 2 runtime (PythonistaKit.framework) is probably the same as the one used by Pythonista 2, so it imports modules from Documents/site-packages instead of Pythonista3/Documents/site-packages. This isn't an optimal solution (the Pythonista 3 UI treats the Pythonista 2 folder as read-only), and a few people have suggested that there should be two site-packages folders for the two Python versions.

Pythonista 2 has no support for Python 3, so it only loads the Python 2 runtime.