Q: how to execute an outside program in the python ?
matt_g_russell at my-deja.com
matt_g_russell at my-deja.com
Fri Jan 5 19:47:45 EST 2001
In article <H5356.720$WF6.14481 at vixen.cso.uiuc.edu>,
"Hwanjo Yu" <hwanjoyu at uiuc.edu> wrote:
> Thanks.
>
>
Using the commands module , you can get the exit status of the shell.
import commnads
aSampleUNIXCommand = "ls -al /"
(exitStatus, output) = commands.getstatusoutput(aSampleUNIXCommand)
Sent via Deja.com
http://www.deja.com/
More information about the Python-list
mailing list