Message235680
| Author |
jgehrcke |
| Recipients |
docs@python, georg.brandl, jgehrcke, krivushinme, pitrou, vstinner |
| Date |
2015年02月10日.11:25:43 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1423567544.22.0.0694451911046.issue23427@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|