Dynamically creating subproccess instances

This is the place for queries that don't fit in any of the other categories.

Dynamically creating subproccess instances

Postby Carbonn » Sat Feb 08, 2014 5:52 pm

Hi i am having a problem regardin spawning subproccess dynamically, pseudo code is:

Execute cmd with subprocess subprocess.Popen(...) -> Parse output which results in a list -> spawn processes with popen for each item in the list (where the proccesses are working simultanious, with independent popen instances) -> recieve std_out from all proccesses.

Can anyone point me in the correct way to do this ?
Last edited by stranac on Sat Feb 08, 2014 6:02 pm, edited 1 time in total.
Reason: First post lock.
Posts: 1
Joined: Sat Feb 08, 2014 5:45 pm

Re: Dynamically creating subproccess instances

Postby stranac » Sat Feb 08, 2014 6:25 pm

Depends on what exactly it is you want, but using twisted is probably the simplest way.
Here's an intro to using processes in twisted:
https://twistedmatrix.com/documents/cur ... ocess.html
Friendship is magic!

R.I.P. Tracy M. You will be missed.
User avatar
Posts: 1790
Joined: Thu Feb 07, 2013 3:42 pm

Return to General Coding Help

Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests