Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
multiprocessing
#1
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.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020