Am Wed, 23 Feb 2005 07:00:31 -0800 schrieb Sandman: > Hi, > I'm a newbie, so please be gentle :-) > > How would I run a shell command in Python? [cut] > Is popen the answer? Also, where online would I get access to good > sample code that I could peruse?
Yes, popen is the answer. I recommend popen4 because it avoids deadlocks if there is output on stdout and stderr. Example: stdout, stdin = popen2.popen4("tidy -q -errors '%s'" % htmlfile) HTH, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list