[issue33180] Flag for unusable sys.executable

Steve Dower report at bugs.python.org
Thu Mar 29 10:53:31 EDT 2018


New submission from Steve Dower <steve.dower at python.org>:

If you host Python in another program, it's likely that sys.executable is not pointing to a normal Python interpreter. This can cause libraries such as multiprocessing to fail when they try to launch the interpreter again. Worse, it may have launched your application many more times before failure :)

I think we should add either a flag to indicate to any such library that sys.executable is not useful for relaunching Python, or a field that points to the actual executable but can safely be left None (or for most horrendous generality, a list of arguments to relaunch, as sometimes a command line option can get you into a normal interpreter). These would be set by embedders only, and Programs/python.c would set the "normal" values.

Thoughts?

----------
assignee: steve.dower
messages: 314655
nosy: eric.snow, ncoghlan, steve.dower
priority: normal
severity: normal
status: open
title: Flag for unusable sys.executable
type: behavior
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33180>
_______________________________________


More information about the Python-bugs-list mailing list