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 ncoghlan
Recipients barry, brett.cannon, carljm, eric.snow, lukasz.langa, ncoghlan, rhettinger
Date 2018-05-17.16:27:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1526574447.54.0.682650639539.issue33499@psf.upfronthosting.co.za>
In-reply-to
Content
I believe the main argument for -X options is the fact that cmd on Windows doesn't offer a nice way of setting environment variables as part of the command invocation (hence "-X utf8", for example).

As far as setting values for X options goes, `sys._xoptions` in CPython is a str:Union[bool,str] dict, with the command args split on "=":

$ python3 -X arg=value -c "import sys; print(sys._xoptions)"                                                                                                                  
{'arg': 'value'}

If no value is given for the arg, then it's just set to the boolean True.

The _xoptions entry shouldn't be the public API though - it's just a way of shuttling settings from the command line through to CPython-specific initialisation code.
History
Date User Action Args
2018-05-17 16:27:27ncoghlansetrecipients: + ncoghlan, barry, brett.cannon, rhettinger, carljm, lukasz.langa, eric.snow
2018-05-17 16:27:27ncoghlansetmessageid: <1526574447.54.0.682650639539.issue33499@psf.upfronthosting.co.za>
2018-05-17 16:27:27ncoghlanlinkissue33499 messages
2018-05-17 16:27:27ncoghlancreate