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

Hertha Steck nulla.epistola at web.de
Sun Nov 19 17:59:49 CET 2006


Am Sat, 18 Nov 2006 23:24:08 -0800 schrieb John (Z R) L:

> Hi all, I am very new to programming, and I chose to study the Python
> language before C++. I am currently using the Wikibooks
> "Non-Programmer's Tutorial for Python", and am up to the section "Who
> goes there"?
> 
> http://en.wikibooks.org/wiki/Non-Programmer%27s_Tutorial_for_Python/Who_Goes_There%3F
> 
> But after clicking "run module" for
> "
> a = 1
> print a
> a = a + 1
> print a
> a = a * 2
> print a "
> 
> The results "1, 2, 4" didn't appear on the GUI screen, in fact nothing
> did. And I clicked twice again, this time, it exited the Python GUI
> program. I tried to enter back in, but it would quickly display
> 
> "1
> 2
> 4"
> 
> before exiting immediately within half a second. How do I stop the this
> exiting from occurring.
> 

All of this using IDLE as your GUI (not PythonWin and not the python
interpreter by itself), right?

You did all this as explained at the start of the tutorial: open a "New
window", type the code into this empty window, save it to a reasonable
place and then click "Run / Run module". Right? (Silly question: there is
no run menu in the interactive window. On the other hand, you never know.)

What about the examples before this one, did you type, save and run them
just like this one? And did they work as you expected?

What version of Python and of IDLE do you use?

If you have PythonWin (it's part of ActiveState Python, for example): what
happens, if you run your script using that? What happens if you open a
command window, go to the right directory and run your script from there?
(Don't try to start it by double clicking in the explorer: it will run,
but the window will close immediately afterwards, and you won't see
anything.)

> Another problem I have is firewall. On my old computer (Windows 98)
> when using Python GUI, it can't run modules because of some firewall.
> But I thought firewalls were for internet sites only?! How do I fix
> this??
> 

Do you mean this?

    ****************************************************************
    Personal firewall software may warn about the connection IDLE
    makes to its subprocess using this computer's internal loopback
    interface.  This connection is not visible on any external
    interface and no data is sent to or received from the Internet.
    ****************************************************************

This shouldn't keep any script from running. What exactly happens if you
try? 



More information about the Python-list mailing list