Benjamin Peterson wrote:
> 2009/8/25 Chris Withers <ch...@simplistix.co.uk>:
> 
>> 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 "RunModule()" (-m switch
and also called for zipfile/directory execution). The latter function
just uses normal C API calls to actually invoke the runpy code
(specifically "runpy._run_module_as_main()").

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to