popen on windows

Daniel Klein danielkleinad at gmail.com
Fri Dec 29 09:08:57 EST 2006


On 27 Dec 2006 09:16:53 -0800, "hubritic" <colinlandrum at gmail.com>
wrote:

>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.

What is the value of 'path' ?

Does the command work from a Windows command prompt ?

Dan



More information about the Python-list mailing list