Re: execute a shell script from a python script

2006-07-18 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Thomas Nelson <[EMAIL PROTECTED]> wrote: >As described in the docs I pointed to before: >subprocess.call("foo.sh",shell=True) >Is the way to do it without args. I think it is simplest to learn the >subprocess module because (quoting from the docs) this module intend

Re: execute a shell script from a python script

2006-07-18 Thread Thomas Nelson
As described in the docs I pointed to before: subprocess.call("foo.sh",shell=True) Is the way to do it without args. I think it is simplest to learn the subprocess module because (quoting from the docs) this module intends to replace several other, older modules and functions, such as: os.system o

Re: execute a shell script from a python script

2006-07-18 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Simon Forman <[EMAIL PROTECTED]> wrote: >spec wrote: >> Thanks, actually there are no args, is there something even simpler? >> >> Thanks >> Frank > >you could try os.system() > >>From the docs: > >system(command) . [more detai

Re: execute a shell script from a python script

2006-07-17 Thread Simon Forman
spec wrote: > Thanks, actually there are no args, is there something even simpler? > > Thanks > Frank you could try os.system() >From the docs: system(command) Execute the command (a string) in a subshell. This is implemented by calling the Standard C function system(), and has the same limi

Re: execute a shell script from a python script

2006-07-17 Thread John McMonagle
On Mon, 2006-07-17 at 16:59 -0700, spec wrote: > Thanks, actually there are no args, is there something even simpler? > > Thanks > Frank > > > Thomas Nelson wrote: > > If your script is foo.sh and takes args: > > import subprocess > > subprocess.call(["foo.sh","args"],shell=True) > > Should work

Re: execute a shell script from a python script

2006-07-17 Thread spec
Thanks, actually there are no args, is there something even simpler? Thanks Frank Thomas Nelson wrote: > If your script is foo.sh and takes args: > import subprocess > subprocess.call(["foo.sh","args"],shell=True) > Should work fine. check out > http://www.python.org/dev/doc/maint24/lib/module-

Re: execute a shell script from a python script

2006-07-17 Thread Thomas Nelson
If your script is foo.sh and takes args: import subprocess subprocess.call(["foo.sh","args"],shell=True) Should work fine. check out http://www.python.org/dev/doc/maint24/lib/module-subprocess.html Enjoy, THN spec wrote: > Hi all, I know nothing about Python. What I need to do is to get a > Pyth

execute a shell script from a python script

2006-07-17 Thread spec
Hi all, I know nothing about Python. What I need to do is to get a Python script to execute a local shell script. I do not need any output. What would be th eeasiest way to accomplish this? Thanks! -- http://mail.python.org/mailman/listinfo/python-list