Re: execute a shell script from a python script
- From: John McMonagle <jmcmonagle@xxxxxxxxxxxxxx>
- Date: Tue, 18 Jul 2006 10:20:57 +1000
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 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
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
Check out os.popen4 or the commands module.
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
.
- References:
- execute a shell script from a python script
- From: spec
- Re: execute a shell script from a python script
- From: Thomas Nelson
- Re: execute a shell script from a python script
- From: spec
- execute a shell script from a python script
- Prev by Date: Re: execute a shell script from a python script
- Next by Date: New SourceForge project: Diet Python!!!
- Previous by thread: Re: execute a shell script from a python script
- Next by thread: Re: execute a shell script from a python script
- Index(es):
Relevant Pages
|