Jan-Philip Gehrcke added the comment:

Victor,

I support the idea of sys.command. However, it would be unpopulated most of the 
time (e.g. set to None by default). Now, is that something we should push 
forward or not? I would work on a patch, but we should have an agreement first, 
I guess.


Mihail,

the original argv becomes modified in the very early bootstrap phase, and the 
command gets lost within that process: it gets *overwritten* with "-c", which 
is exactly why you are observing two "-c". This happens here:

https://hg.python.org/cpython/file/default/Modules/main.c#l684

So, no, without a code change in main.c there will be no way to retain the 
command for later usage.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23427>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to