[Tutor] how to get the confirmation that a cmd done using os.system is corectely done?

Michael Janssen Janssen@rz.uni-frankfurt.de
Mon Feb 24 05:18:34 2003


On Sun, 23 Feb 2003, kbond wrote:

> the connection. I want to display the message ("The computer is
> connected to internet") in a wxStaticText when the command "pon
> Free_Telecom" is succesfully finish.

check for popen2 modul:
lib/module-popen2.html
lib/popen3-objects.html

poll() and wait() seems appropiate for your task.

(but also simple os.system should wait until execution of the connecting
command. Does this command possibly return it's exit status before it's
job is done (because it is working in the background)? In this case popen2
isn't better. You need actively check if the connection is done.)

Michael

> The actual status is the message is coming during the connection and not
> when the connection is done.
> I am attaching the complete code to this mail.
> Any suggestion to improve it are welcome.
>
> Regards,
>
> Yann
>