catch argc-argv

Wolfram Kraus kraus at hagen-partner.de
Mon Jun 20 02:52:22 EDT 2005


mg wrote:
> Hello,
> 
> I am writting bindings for a FEM application. In  one of my function 
> 'initModulename', called when the module is imported, I would like to 
> get the argc and argv arguments used in the main function of Python.
> So, my question is: does the Python API containe fonctions like 
> 'get_argc()' and 'get_argv()' ?
> 
> Thanks,
> 
> 
> 
Use sys.argv:
http://python.org/doc/2.4.1/lib/module-sys.html

HTH,
Wolfram



More information about the Python-list mailing list