Jump to content

Python's multiprocessing


ajz

Recommended Posts

what about using popen?   you could have 2 scripts  one that runs in Houdini and calls the second one,    that way you can tell to open any program on the back, in this case python running what you need and returning it to the first script.

(pseudocode) in the main script:

 

results = []

for I in list:

     bla = popopen("python /path/to/second/script", stdout=pipeline, stderr=pipeline)

    std, sterr = bla.communicate()

    results.append(std)

 

print results

 

 

this will open pythons on the back and return what was printed,   you could also do the second scripts to export the information to txt files and then have a way to read back form that txt

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...