How to schedule system calls with Python
Christian Heimes
lists at cheimes.de
Fri Oct 16 06:21:41 EDT 2009
More information about the Python-list mailing list
Fri Oct 16 06:21:41 EDT 2009
- Previous message (by thread): How to schedule system calls with Python
- Next message (by thread): How to schedule system calls with Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
MRAB wrote: > You could use multithreading: put the commands into a queue; start the > same number of worker threads as there are processors; each worker > thread repeatedly gets a command from the queue and then runs it using > os.system(); if a worker thread finds that the queue is empty when it > tries to get a command, then it terminates. Threads aren't necessary here and the OP shouldn't use os.system() either. The subprocess module is superior and makes the solution much either without the need for threads. Christian
- Previous message (by thread): How to schedule system calls with Python
- Next message (by thread): How to schedule system calls with Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list