How do I execute a command from within python and wait on that command?

Rafael Sachetto rsachetto at gmail.com
Fri Feb 15 18:56:04 CET 2008


os.system(command)

or

proc = popen2.Popen3(command)
proc.wait()

2008/2/15, black_13 <jjosburn at gmail.com>:
> how do i exec a command (such as xcopy) from with win32 python and
>  wait on that command
>  to come to completion? and also cleanly terminate the command shell?
>  thanks
>  black_13
>
> --
>  http://mail.python.org/mailman/listinfo/python-list
>


-- 
Rafael Sachetto Oliveira

Sir - Simple Image Resizer
http://rsachetto.googlepages.com



More information about the Python-list mailing list