This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chris.jerdonek
Recipients bkabrda, chris.jerdonek, ncoghlan, nedbat, pitrou, serhiy.storchaka
Date 2012-07-31.14:55:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> However, the -C option doesn't cover the case of *implicit* invocation of subprocesses. This is where the PYTHONRUNFIRST suggestion comes in

Would a more general solution than PYTHONRUNFIRST be something like a suitably named PYTHONRUNINSTEAD? This would be an arbitrary script to run in place of python any time python was invoked. Alternatively (and less powerfully), it could be a default set of command options to pass to the Python executable.  Both of these seem more general than PYTHONRUNFIRST because the 'runas' command could itself be `python -C $PYTHONRUNFIRST ....`

> unless -E is specified, then -C $PYTHONRUNFIRST would be implied. To be honest, I *don't* think this latter capability should be built into the core implementation.... so that it doesn't inadvertently affect invocation of other applications (like hg)

It seems what you're saying is that you'd want PYTHONRUNFIRST to run only in special situations, rather than as the default.  Is there a sense then in which a functionality inverse to -E could be provided?  The idea would be that, when running Python, you could somehow instruct that an option like PYTHONRUN* would take effect only for the subprocesses spawned by the main process you're invoking (kind of like a context manager for the invocation of Python itself)?

The advantage of this approach would be that a special PYTHONRUNFIRST setting wouldn't take effect unless you explicitly say so.
Date User Action Args
2012-07-31 14:55:57chris.jerdoneksetrecipients: + chris.jerdonek, ncoghlan, pitrou, nedbat, serhiy.storchaka, bkabrda
2012-07-31 14:55:57chris.jerdoneksetmessageid: <>
2012-07-31 14:55:57chris.jerdoneklinkissue14803 messages
2012-07-31 14:55:56chris.jerdonekcreate