[Tutor] Please critique my Fraq.py (original) (raw)
Alan Gauld alan.gauld at blueyonder.co.uk
Sun Jul 25 19:48:31 CEST 2004
- Previous message: [Tutor] Please critique my Fraq.py
- Next message: [Tutor] alphabetizing a file by lines
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>That's because IDLE catches SystemExit. >It quite reasonably assumes that you don't want to restart >IDLE every time you run your program to an exit.
(You're referring to the use of sys.exit().) But if I hit F5 to run a program I've been editing in IDLE, I have to restart the program anyway if it exits via sys.exit()
Yes you restart your program by hitting F5 again, but you don't need to restart IDLE itself. If IDLE didn't catch SystemExit then IDLE would die when our program did!
Since IDLE is a development environment that is a reasonable behaviour, once you run the program outside of IDLE then it will exit cleanly as expected.
Alan G.
- Previous message: [Tutor] Please critique my Fraq.py
- Next message: [Tutor] alphabetizing a file by lines
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]