popen on windows

hubritic colinlandrum at gmail.com
Wed Dec 27 12:16:53 EST 2006


I am trying to set off commands on Windows 2003 from python.
Specifically, I am trying to use diskpart with a script file (pointed
to with path).

            cmd = ["diskpart",  "/s", path]
            p = Popen(cmd, shell=True)

The script is meant to loop through twice. It will do so if I comment
out the Popen call and print cmd instead. But when Popen is called, one
disk will be formated, but not the next.




More information about the Python-list mailing list