[Tutor] Running subProcesses in parallel for mixed external Windows.exe and Python functions on specified CPUs.

Tim Golden mail at timgolden.me.uk
Fri May 1 18:04:13 CEST 2009


Ian Campbell wrote:
> Running subProcesses in parallel for mixed external Windows.exe and 
> Python functions on specified CPUs.
> 
> How  does a newbie start to make this work?

[... snip most stuff ...]

> p11 = subprocess.Popen("C:\myDdeServer.exe ")                 # loads 
> DDE Server        p12 = subprocess.Popen("c:\ddeClicks.ahk 
> group                 p21 = subprocess.Popen("C:\showRawData.xlsm 
>    p22 = subprocess.Popen("c:\xlsClicks.ahk ")                   # send 
> subprocess.Popen("pw5.exe c:\legacyScript.was")         # loads legacy 
>    p32 = subprocess.Popen("c:\wasClicks.ahk ")                    # 


You're going to have to use raw strings or
reverse the backslashes on those paths:

r"C:\myDdeServer.exe "

or

"C:/myDdeServer.exe "



Haven't looked at the rest of the code yet, not least because it comes out
a bit messy on my email client.

TJG


More information about the Tutor mailing list