[Python-Dev] What about PEP 299? (original) (raw)

Guido van Rossum guido at python.org
Wed Mar 29 00:53:31 CEST 2006


On 3/28/06, Charles Cazabon <python at discworld.dyndns.org> wrote:

It might be worth instead adding an option flag to the executable that implies "from the loaded module, run main() with sys.argv as its argument(s)", so the user can get this behaviour with python -X somemodule.py.

You can do "python -x somemodule" as long as somemodule.py uses the if name=='main' convention. What does your proposal add?

-- --Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list