On 11/02/13 01:14, Steven D'Aprano wrote:

exit() and quit() (as added by the site.py module) are for interactive use.

aha!

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.

Indeed, and Ctrl-D is how I exit the prompt...

For programmatic use in scripts, use sys.exit(), since the site module is
not guaranteed to run.

Thanks for that clarification. No need to change my coding habits after all then :-)

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to