On 10/02/13 20:25, ALAN GAULD wrote:
Maybe the OP meant to say 'quit()' ? That does not require an import.
Ooh! another option I didn't know about!
So many ways to get rid of Python and here's me been importing sys
or raising SystemExit all these years... :-)
exit() and quit() (as added by the site.py module) are for interactive use.
They're mostly there for the benefit of newbies. Experienced developers (at
least in the Unix/Linux world) usually know to exit interactive terminal
apps with Ctrl-D. I believe you use Ctrl-Z <enter> under Windows.
For programmatic use in scripts, use sys.exit(), since the site module is
not guaranteed to run.
--
Steven
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor