You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I propose to add _Py_RunMain() (currently private, until PEP-587 is accepted) to be able to implement something similar to Py_Main() but with way more configuration options:
Example to create an "isolated Python" in a few line of C:
---
Activity
vstinner commentedon Mar 29, 2019
The PEP-587 adds new functions taking command line arguments:
I propose to add _Py_RunMain() (currently private, until PEP-587 is accepted) to be able to implement something similar to Py_Main() but with way more configuration options:
Example to create an "isolated Python" in a few line of C:
---
It's like the regular "python3" program, except that it's always isolated:
---
Using _Py_RunMain(), it becomes trivial to implement something like PEP-432's "system python" idea ;-)
vstinner commentedon Mar 29, 2019
I'm working on a PR to implement it.
vstinner commentedon Mar 29, 2019
New changeset 2f54908 by Victor Stinner in branch 'master':
bpo-36471: Add _Py_RunMain() (GH-12618)
2f54908
vstinner commentedon May 11, 2019
The PEP-587 will decide if this function is made public or not.