[wingide-users] import subprocess

John Burnett JBurnett at blizzard.com
Tue May 13 12:00:46 MDT 2008

Ah, ok, thanks!  FWIW, John at Wingware helped get my usage of AsyncExecuteCommandLine worked out as well.  For posterity, here it is:

    handler = app.AsyncExecuteCommandLine(exePath, startInDir, *args)
    def poll():
        done = handler.Iterate()
        if done:
            return 0
            return 1
    app.InstallTimeout(500, poll)


-----Original Message-----
From: Adam Pletcher [mailto:adam at volition-inc.com] 
Sent: Tuesday, May 13, 2008 7:27 AM
To: John Burnett
Cc: wingide-users at wingware.com
Subject: RE: [wingide-users] import subprocess

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.

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