[Tutor] how to see a terminal window showing progress of os.system
pedro
pedrooconnell at gmail.com
Mon Dec 21 07:20:36 CET 2009
On 2009-12-17 20:02:03 -0500, "Alan Gauld" <alan.gauld at btinternet.com> said:
>
> "pedro" <pedrooconnell at 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
More information about the Tutor
mailing list