[wingide-users] import subprocess

Wingware Support support at wingware.com
Mon May 12 17:22:07 MDT 2008

John Burnett wrote:
> Hello,
> I have "import subprocess" at the top of an extension script.  However,
> when I try running it (either on startup or via edit>reload all
> scripts), this errors out with:

subprocess is not included in the set of modules that come with Wing's 
private copy of Python.  I still suggest that you use the OS Commands 
tool to define your commands, but you should use Wing's api functions 
for managing subprocesses if you want to write a script.  Please see the 
svn.py script of one of the other bundled scripts for an example.  You 
could also import a copy of subprocess by modifying sys.path but you'd 
either need to poll the subprocess or create another thread -- and Wing 
is a single threaded application.



More information about the wingide-users mailing list