Message316959
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. |
|
Date |
User |
Action |
Args |
2018-05-17 16:27:27 | ncoghlan | set | recipients:
+ ncoghlan, barry, brett.cannon, rhettinger, carljm, lukasz.langa, eric.snow |
2018-05-17 16:27:27 | ncoghlan | set | messageid: <1526574447.54.0.682650639539.issue33499@psf.upfronthosting.co.za> |
2018-05-17 16:27:27 | ncoghlan | link | issue33499 messages |
2018-05-17 16:27:27 | ncoghlan | create | |
|