Forum Archive

Wishlist:: API/GUI for New Interpreter

georg.viehoever

Pythonista has a couple of problems because all executables share a common interpreter (for instance, they all share sys.path). From looking at the Python C-API https://docs.python.org/2/c-api/init.html , it appears to be possible to create sub-interpreters via Py_NewInterpreter() , permitting a certain isolation between different interpreters.

I think it would be desireable to be able to create new interpreters, and reset existing ones.

Georg

georg.viehoever

I had a look ar the PyNewInterpreter API. It might be a way to create threads that have a little bit more privacy than the current ones. It appears that I cannot use the API via ctypes (because that would mean that in interpreter thread needs to manipulate itself). But I think that some Pythonista-provided functionality would be possible.

Please consider this for a future release (or convince Apple to allow sub-processes in iOS - whichever is easier for you ;-) )

Thanks,
Georg