Python Forum

Full Version: multiprocessing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi guys,

I'm new 2 python, im glad to see what is possible with Python! Also it is really easy to learn.

ok my question.
I am programming kind of a service to maintain a few terminal commands i do now manually in the terminal in ubuntu. I know the existenceof Python os, multiprocess, subprocces and Popen. but it is a lot investigation and code attempts to see which one will fit the best. Maybe I did not found another solution yet.

the problem is:
I want one script to maintain different terminal commands at the same time, get their output (if possible, realtime) and processing their exit/error-codes. also I want my script to continue and not wait for every command to finish first before continue. also I want to communicate between these processes before i launch a new command when another is finished while another is still running. And my script doesn't freeze it is okay but not needed if it launches multiple windows. I just want to know the exit/error codes.

is Popen the best solution for this?

edit: Yes it is.