[wingide-users] import subprocess

Adam Pletcher adam at volition-inc.com
Tue May 13 08:26:43 MDT 2008


I use subprocess in some of my extensions.  You just need to add the
path to the module, where it lives in your standard Python installation.
Example:

	import sys
	sys.path.append(r'C:\python25\lib')
	import subprocess

You might need a few more, depending on what else the script imports.
Looking at sys.path in IDLE will show what your standard Python install
is used to.

--
Adam Pletcher
Technical Art Director
Volition, Inc./THQ

> -----Original Message-----
> From: wingide-users-bounces at wingware.com [mailto:wingide-users-
> bounces at wingware.com] On Behalf Of John Burnett
> Sent: Monday, May 12, 2008 6:12 PM
> To: Wingware Support
> Cc: wingide-users at wingware.com
> Subject: [wingide-users] import subprocess
> 
> 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:
> 
> ####
> Error::Failed to load startup from
> C:\Users\jburnett\AppData\Roaming\Wing IDE 3\scripts\startup.py:
> Runtime failure details:
> Exception: "<type 'exceptions.ImportError'>"
> Value = 'No module named subprocess'
> Traceback:
>   File "C:\src\ide\bin\2.5\src\scripting\cap_scriptmgr.pyo", line 689,
> in _ProcessScriptModule
>   File "C:\Users\jburnett\AppData\Roaming\Wing IDE
> 3\scripts\startup.py", line 3, in <module>
>     import subprocess
> ####
> 
> ...any idea why?  "import subprocess" works just fine in the shell,
> both
> in and out of Wing...
> 
> John
> _________________________________________________
> Wing IDE users list
> http://wingware.com/lists/wingide


More information about the wingide-users mailing list