execute a shell script from a python script
Cameron Laird
claird at lairds.us
Tue Jul 18 14:55:49 EDT 2006
In article <1153243296.095949.268520 at s13g2000cwa.googlegroups.com>,
Thomas Nelson <thn at mail.utexas.edu> 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 intends
>to replace several other, older modules and functions, such as:
>os.system
>os.spawn*
>os.popen*
>popen2.*
>commands.*
>This way you only need to learn one thing. Actually I would like to
>see some of these older functions deprecated.
.
.
.
A point worth repeating, and I salute your courtesy in doing so.
I had realized neither the deprecation of these interfaces, nor
the documentation to that effect, so I thank you for pointing
them out.
More information about the Python-list
mailing list