[issue14208] No way to recover original argv with python -m

2017-03-19 Thread Nick Coghlan
Nick Coghlan added the comment: A few updates here: * For the specific case of `python -m`, the original argument has been available as `__main__.__spec__.name` since Python 3.4 * Also since Python 3.4, the `multiprocessing` module has correctly handled the -m switch. For more details, see h

[issue14208] No way to recover original argv with python -m

2017-03-19 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue14208] No way to recover original argv with python -m

2017-03-19 Thread Jakub Wilk
Changes by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org

[issue14208] No way to recover original argv with python -m

2013-10-24 Thread Tim Golden
Changes by Tim Golden : -- nosy: -tim.golden ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue14208] No way to recover original argv with python -m

2013-01-23 Thread Tim Golden
Tim Golden added the comment: My use case is the reloader or restarter. I've initially fallen foul of this when using the cherrypy reloader (which does an execv by building from sys.executable + sys.argv) but I also have web services running which I'd like to restart remotely by forcing them t

[issue14208] No way to recover original argv with python -m

2013-01-13 Thread Daniel Shahaf
Daniel Shahaf added the comment: Antoine Pitrou wrote on Sun, Jan 13, 2013 at 10:19:20 +: > > Antoine Pitrou added the comment: > > > I'm not seeing a good justification for doing anything more, though: > > > > - needing to access this information is an exceedingly niche use case > > - I d

[issue14208] No way to recover original argv with python -m

2013-01-13 Thread Nick Coghlan
Nick Coghlan added the comment: I'm not seeing a good justification for doing anything more, though: - needing to access this information is an exceedingly niche use case - I don't see any way for raw_argv to be useful in a cross-implementation manner. - the exposure as sys._configuration.raw_a

[issue14208] No way to recover original argv with python -m

2013-01-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'm not seeing a good justification for doing anything more, though: > > - needing to access this information is an exceedingly niche use case > - I don't see any way for raw_argv to be useful in a cross-implementation > manner. I expect it to be useful in t

[issue14208] No way to recover original argv with python -m

2013-01-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > For PEP 432, I'm proposing to expose this as sys._configuration.raw_argv I think sys.raw_argv would be as good. It's not really (not only) a configuration item. -- ___ Python tracker

[issue14208] No way to recover original argv with python -m

2013-01-12 Thread Nick Coghlan
Nick Coghlan added the comment: For PEP 432, I'm proposing to expose this as sys._configuration.raw_argv -- ___ Python tracker ___ ___

[issue14208] No way to recover original argv with python -m

2013-01-12 Thread Daniel Shahaf
Changes by Daniel Shahaf : -- nosy: +danielsh ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue14208] No way to recover original argv with python -m

2012-03-07 Thread Georg Brandl
Georg Brandl added the comment: I agree. Maybe I may throw "full_argv" or "executable_argv" (i.e. to be used with exec([sys.executable] + sys.executable_arg)) in the air? -- ___ Python tracker __

[issue14208] No way to recover original argv with python -m

2012-03-07 Thread Nick Coghlan
Nick Coghlan added the comment: In framing a question for Raymond regarding his preference for avoiding the __argv__ name, I realised I agreed with him. My reasoning is that, when a Python process starts, sys.stdin is sys.__stdin__, sys.stdout is sys.__stdout__ and sys.stderr is sys.__stderr_

[issue14208] No way to recover original argv with python -m

2012-03-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: Instead of sys.__argv__, may I suggest sys.argv_original or somesuch. -- nosy: +rhettinger ___ Python tracker ___ __

[issue14208] No way to recover original argv with python -m

2012-03-06 Thread Nick Coghlan
Nick Coghlan added the comment: This is closely related to PEP 395, since multiprocessing currently hits the same issue in trying to figure out the correct setting for sys.argv0. I quite like the sys.__argv__ idea for preserving the *exact* underlying command line (Alex Gaynor was recently as

[issue14208] No way to recover original argv with python -m

2012-03-06 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14208] No way to recover original argv with python -m

2012-03-06 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +brett.cannon, eric.araujo, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue14208] No way to recover original argv with python -m

2012-03-06 Thread Florent Xicluna
Changes by Florent Xicluna : -- nosy: +flox ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue14208] No way to recover original argv with python -m

2012-03-05 Thread Georg Brandl
Georg Brandl added the comment: I agree this would be useful. It would be even more useful to have an __argv__ that includes all command-line flags given to Python, such as -Wi. -- nosy: +georg.brandl, pitrou versions: +Python 3.3 ___ Python tracke

[issue14208] No way to recover original argv with python -m

2012-03-05 Thread Ben Darnell
New submission from Ben Darnell : I have a script which attempts to re-invoke itself using sys.argv, but it fails when run with "python -m package.module". The problem is that the handling of -m (via the runpy module) rewrites sys.argv as if it were run as "python package/module.py", but the