Re: [Python-Dev] runpy.py

2009-09-01 Thread Nick Coghlan
Brett Cannon wrote: > On Mon, Aug 31, 2009 at 06:36, Nick Coghlan wrote: >> That said, while actually ditching the C code might cause an argument, >> expanding runpy with Python equivalents of the C level functionality >> (i.e. run script by name, run directory/zipfile by name, '-c' switch, >> and

Re: [Python-Dev] runpy.py

2009-08-31 Thread Brett Cannon
On Mon, Aug 31, 2009 at 06:36, Nick Coghlan wrote: > Chris Withers wrote: >> Nick Coghlan wrote: >>> The PEPs don't go into the process of how we actually hook the command >>> line up to the runpy module though - that's something you need to dig >>> into the main.c code to really understand. >> >>

Re: [Python-Dev] runpy.py

2009-08-31 Thread Nick Coghlan
Chris Withers wrote: > Nick Coghlan wrote: >> The PEPs don't go into the process of how we actually hook the command >> line up to the runpy module though - that's something you need to dig >> into the main.c code to really understand. > > Yeah, main.c does quite a lot... ;-) > > This all spawned

Re: [Python-Dev] runpy.py

2009-08-31 Thread Chris Withers
Nick Coghlan wrote: The PEPs don't go into the process of how we actually hook the command line up to the runpy module though - that's something you need to dig into the main.c code to really understand. Yeah, main.c does quite a lot... ;-) This all spawned from a suggestion by Jim Fulton over

Re: [Python-Dev] runpy.py

2009-08-26 Thread Nick Coghlan
Alexander Belopolsky wrote: > Take a look at two PEPs referenced in runpy doc, > http://docs.python.org/3.1/library/runpy.html : > > PEP 338 - Executing modules as scripts > PEP written and implemented by Nick Coghlan. > PEP 366 - Main module explicit relative imports > PEP written and implemented

Re: [Python-Dev] runpy.py

2009-08-25 Thread Alexander Belopolsky
Take a look at two PEPs referenced in runpy doc, http://docs.python.org/3.1/library/runpy.html : PEP 338 - Executing modules as scripts PEP written and implemented by Nick Coghlan. PEP 366 - Main module explicit relative imports PEP written and implemented by Nick Coghlan. (Nick is too modest to

Re: [Python-Dev] runpy.py

2009-08-25 Thread Nick Coghlan
Benjamin Peterson wrote: > 2009/8/25 Chris Withers : > >> Anyway, so how is the stuff in runpy.py wired up to the command line options >> passed to the interpretter? > > Modules/main.c The most relevant functions in there are "RunMainFromImporter()" (attempting zipfile/directory execution) and "

Re: [Python-Dev] runpy.py

2009-08-25 Thread Benjamin Peterson
2009/8/25 Chris Withers : > Anyway, so how is the stuff in runpy.py wired up to the command line options > passed to the interpretter? Modules/main.c -- Regards, Benjamin ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailm

Re: [Python-Dev] runpy.py

2009-08-25 Thread Chris Withers
Benjamin Peterson wrote: 2009/8/24 Chris Withers : Guido van Rossum wrote: Anyway it looks like if someone wants to try this, only the code in runpy.py needs to be touched. Where is runpy.py to be found? $ find . -name "runpy.py" ./Lib/runpy.py Heh, grep beats Mk I eyeball ;-) (I did actua

Re: [Python-Dev] runpy.py

2009-08-24 Thread Benjamin Peterson
2009/8/24 Chris Withers : > Guido van Rossum wrote: >> >> Anyway it looks like if someone wants to try this, only the code in >> runpy.py needs to be touched. > > Where is runpy.py to be found? $ find . -name "runpy.py" ./Lib/runpy.py -- Regards, Benjamin ___

[Python-Dev] runpy.py

2009-08-24 Thread Chris Withers
Guido van Rossum wrote: Anyway it looks like if someone wants to try this, only the code in runpy.py needs to be touched. Where is runpy.py to be found? I'm trying to find whatever implements python -m and the other python command line options... Chris -- Simplistix - Content Management, B