[Tutor] Code to open a website
Alan Gauld
alan.gauld at btinternet.com
Mon Feb 11 18:50:15 CET 2013
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/
More information about the Tutor
mailing list