Using switches with exec?

Premshree Pillai premshree_python at yahoo.co.in
Mon Jan 12 12:07:18 EST 2004


 --- "Diez B. Roggisch" <nospam-deets at web.de> wrote: >
> I need to run a Python program dynamically within
> > another program. I am using exec for the purpose.
> Is
> > there a way to pass parameter switches to exec?
> 
> You can pass a globals-dictionary to exec, which can
> hold the switches
> values. 
> 
> Diez
> -- 
> http://mail.python.org/mailman/listinfo/python-list

Could you please elucidate with a sample script.
Suppose I need to pass the switch "-w" to the
dynamically loaded code (using eval()/exec()).
Any help is appreciated.

-Premshree

________________________________________________________________________
Yahoo! India Mobile: Download the latest polyphonic ringtones.
Go to http://in.mobile.yahoo.com




More information about the Python-list mailing list