On 2009-12-17 20:02:03 -0500, "Alan Gauld" <alan.ga...@btinternet.com> said:


"pedro" <pedrooconn...@gmail.com> 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,

Thanks I'll check out your site.
Pete


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

Reply via email to