[New-bugs-announce] [issue29857] Provide `sys._raw_argv` for host application's command line arguments

Nick Coghlan report at bugs.python.org
Mon Mar 20 02:33:43 EDT 2017


New submission from Nick Coghlan:

Issue 14208 was ultimately resolved through an import system specific solution, with PEP 451 making the module name passed to `python -m` available as `__main__.__spec__.name`.

However, there are other situations where it may be useful to offer an implementation-dependent attribute in the `sys` module that provides access to a copy of the host application's raw `argv` details, rather than the filtered `sys.argv` details that are left after the host application's command line processing has been completed.

In the case of CPython, where `sys.argv` represents the arguments to the Python level __main__ function, `sys._raw_argv` would be a copy of the argv argument to the C level main() or wmain() function (as appropriate for the platform).

----------
messages: 289873
nosy: ncoghlan
priority: normal
severity: normal
status: open
title: Provide `sys._raw_argv` for host application's command line arguments
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29857>
_______________________________________


More information about the New-bugs-announce mailing list