[Tutor] Code to open a website

Albert-Jan Roskam fomcl at yahoo.com
Sun Feb 10 10:17:10 CET 2013

> On Sat, Feb 9, 2013 at 8:33 PM, Alan Gauld <alan.gauld at btinternet.com> 

> wrote:
>>  Where does exit() come from? Usually its from sys but you
>>  don't import from sys anywhere...
> site.py adds the exit/quit Quitter instances to builtins (2.x
> __builtin__). When called they raise SystemExit, like sys.exit does.
> Since you can bypass importing site.py with the -S flag, it's better
> to use sys.exit.

Maybe the OP meant to say 'quit()' ? That does not require an import.

More information about the Tutor mailing list