Qutting the interpreter
Bjorn Pettersen
bjorn at roguewave.com
Fri Mar 31 12:12:30 EST 2000
Mikael Olofsson wrote:
>
> On 31-Mar-00 Michael Ackerman wrote:
> > I am trying to find a way of quitting the interpreter. On p.3 of the
> > tutorial it says this can be done by 'import sys; sys.exit()', but this
> > produces an error message when I try it. I used to be able to quit by
> > 'raise SystemExit', but that no longer works either. So how is this done?
> > I am using version 1.5.2c.1 of Python on a Mac.
>
> Try ^D
>
> That works at least on Unix. If you write quit at the prompt you should
> get this information.
That's just what happens to be the end-of-file character on *nix. Eg. on
windows it's ^Z. I have no idea what it would be on a Mac however...
-b
More information about the Python-list
mailing list