Wednesday, 11 September 2013

Execute Shell Script from python with variable

Execute Shell Script from python with variable

I have this code:
opts.info("Started domain %s (id=%d)" % (dom, domid))
I want to execute a shell script with the parameter "domid" from above.
Something like this:
subprocess.call(['test.sh %d', domid])
How does it work?

No comments:

Post a Comment