"pedro" <[email protected]> wrote

Hi I am sending commands to the command line using python's os.system.

Is there a way to see a terminal window showing the progress of os.system as if you had just run the command from a normal terminal window? As it is now it runs completely in the background

You can sometimes launch a terminal with your program running in it but thats usually not the best way to do it. Normally you would use the subprocess module and the Popen class to capture the output of the command and either monitor it for some event or display it within your own program. That looks more professional and gives you much more control

You will find examples of using subprocess in the Using the OS topic of my tutorial.

HTH,


--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to