Re: execute a shell script from a python script
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!
.
Relevant Pages
- Re: Executing python script stored as a string
... how to execute a python script stored as a string? ... You can pass in a global and local namespaces to exec as arguments: ... the script in string should behave just like any other ordinary python ... If you want it to execute in a separate *process*, ... (comp.lang.python) - Re: Will Linux become as vulnerable as MS ??
... > beeing vulnerable to viruses. ... > that they know are executable, and execute intentionally. ... >> Linux, each distro is a little different, and even within the distro, ... > Since clicking on a script is easier than typing it's name, ... (comp.os.linux.security) - Re: [Full-Disclosure] ColdFusion cross-site scripting security vulnerability of an error page
... > execute the arbitrary javascript and HTML code which the attacker ... > It is possible to display the contents transmitted from the client ... > cross-site scripting attack can be executed. ... the script will be executed when the script for an attack ... (Full-Disclosure) - CGIscript.net - csMailto.cgi - Remote Command Execution
... CGIscript.net - csMailto.cgi - Remote Command ... csMailto is a perl cgi formmail script developed by ... execute command on server and mail output to anyone ... (Bugtraq) - Re: Extracting data from an XML to put into a constant
... ExecuteGlobal "Const cnUB = 9" ... The following script causes the same error. ... Ordinary variables and constants defined with execute statements have ... no value until their defining statement is executed at run time. ... (microsoft.public.scripting.vbscript) |
|