Re: Executing a python script with arguments from a python script

2005-12-12 Thread James Stroud
Larry Bates wrote: > You can pass arguments into a python script, see getopt module. > Then to call an external script you would use subsystem module > (or os.system if you are on earlier version of python). I think getopt is a little dated. Try optparse. To quote the python documentation, it is

Re: Executing a python script with arguments from a python script

2005-12-12 Thread Larry Bates
You can pass arguments into a python script, see getopt module. Then to call an external script you would use subsystem module (or os.system if you are on earlier version of python). If you can, just make the other python program into a function and import it as James Stroud suggests in a separate

Re: Executing a python script with arguments from a python script

2005-12-12 Thread James Stroud
[EMAIL PROTECTED] wrote: > Hi, > > I need to call a python script, with command line arguments (it is an > autonomous script with a __main__), from within another python script. > Can I use exec() or execfile() for this? How to pass the arguments? > > Thanks, > > Olivier. > Obligatory "ugh."

Executing a python script with arguments from a python script

2005-12-12 Thread olaufr
Hi, I need to call a python script, with command line arguments (it is an autonomous script with a __main__), from within another python script. Can I use exec() or execfile() for this? How to pass the arguments? Thanks, Olivier. -- http://mail.python.org/mailman/listinfo/python-list