[Tutor] Why does this kill PythonWin IDE?
Jeff Shannon
jeff@ccvcorp.com
Thu Jun 19 17:39:04 2003
Patrick Kirk wrote:
> Running this script in PythonWin IDE cause a hung app. Could anyone
> run thsi for me as a test? I just need to check if i'st the script or
> have I a problem with PythonWin IDE
There's nothing wrong with PythonWin or your script. It's doing exactly
what you told it to do -- which is to wait forever, continually checking
the socket to see if anything is coming in. It doesn't pay attention to
anything else while it's doing that. Because PythonWin executes code
in-process, that means that PythonWin can't do anything itself -- it's
waiting for your script to finish, and your script never finishes
(because you told it to continue forever).
Any code that is designed to run forever (until killed) needs to be run
in a separate process (or at least a separate thread). The simple way
to do this is to start a command (DOS) window to execute the script.
Jeff Shannon
Technician/Programmer
Credit International