How do I stop Python IDLE (GUI) from immediately exiting when I enter it?

John (Z R) L lowz06 at gmail.com
Mon Nov 20 15:11:32 EST 2006


> First of all: did you try to run the script using PythonWin and did you
> run it in a command window? What happened? What error messages did you
> get, if any?
>
> The script itself doesn't contain any errors. And in my IDLE it behaves
> perfectly well.
>
> And please, if you answer, keep the text you are answering. This is no web
> forum where you can see several postings at once.

The script is running perfectly fine now for some strange reason?? But
previously it wasn't.

I always type my script in a new Window of the IDLE interface, and when
I do "Run Module", the output appears in the main Python Shell (IDLE).

When I tried to run the script, "1,2,4" would appear, but the new
prompt (>>>) DOESN'T appear. So when I want to run other modules that I
made, Python Shell will say something like "Can't run script, in the
middle of another module process.".

So I have to exit the Python Shell, and then it says "You are currently
running a module, kill it?". I click "Yes", but when I reenter the
program, "1,2,4" suddenly appear on the output, then the program
immediately exits within half a second.

I solve this by deleting the .py and .pyc file which it keeps on
displaying, and the Python IDLE gets reset.

I don't have to delete stuff anymore because the scripts are running
fine now. But I'm worried that this error will happen again
(randomly?!), and I'll be in for more inconvenience...




More information about the Python-list mailing list