A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-March/147624.html below:

[Python-Dev] Set program name through exec -a or environment variable

[Python-Dev] Set program name through exec -a or environment variable [Python-Dev] Set program name through exec -a or environment variableGreg Ewing greg.ewing at canterbury.ac.nz
Sat Mar 18 19:12:07 EDT 2017
Oleg Broytman wrote:
> On Sat, Mar 18, 2017 at 10:27:58AM -0500, Ryan Gonzalez <rymg19 at gmail.com> wrote:
> 
>>exec -a would seem to end up setting argv[0] on the CPython interpreter
>>itself, which I don't think is the desired effect...
> 
>    That's exactly what OP asked -- how to change that?

Maybe python itself should have an -a option, so that

    python -a blarg foo.py

would run foo.py with sys.argv[0] == 'blarg'.

-- 
Greg
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4