I have been teaching myself python over the past few months and am finally starting to do some useful things.
What I am trying to ultimately do is have a python script that acts as a queue. That is, I would like to have a folder with a bunch of input files that another program uses to run calculations (I am a theoretical physicist and do many computational jobs a day).
The way I must do this now is put all of the input files on the box that has the computational software. Then I have to convert the dos input files to unix (dos2unix), following this I must copy the new input file to a file called 'INPUT'. Finally I run a command that starts the job.
All of these tasks are handled in a command prompt. My question is how to I interface my program with the command prompt? Then, how can I monitor the process (which I normally do via cpu usage and the TOP command), and have python start the next job as soon as the last job finishes.
Sorry for rambling, I just do not know how to control a command prompt from a script, and then have it automatically 'watch' the job.
Thanks