Exiting from python shell

James Matthews nytrokiss at gmail.com
Wed Jul 18 20:00:59 EDT 2007


try raise SystemExit

On 7/18/07, Mark Elston <m.elston at advantest-ard.com> wrote:
>
> * James Stroud wrote (on 7/18/2007 4:27 PM):
> > Tobiah wrote:
> >> For years now, I've been exiting the shell by typing 'exit\n',
> >> being chid by the shell, and then typing ^D.  I can't
> >> remember a time that I typed the ^D the first time.  Call
> >> me an idiot if you must, but since someone took the trouble
> >> to catch the command 'exit' in a special way, would it have
> >> been so awful to just let it be a way to exit when the shell?
> >>
> >> Thanks,
> >>
> >> Toby
> >>
> >
> > Yes, this would have required a ground-up approach to redesigning the
> > python language, transmuting it to something like a cross between lisp
> > and COBOL and would have rendered it impossible to author with C because
> > of the way C implements pointers--hardcoding in assembly would likely be
> > required. Beyond that, exiting an interpreter is not known in computer
> > science and has been shown impossible by Goedel himself in a series of
> > monographs on the topic. Thus, to exit python via a keyword would
> > require also reformulating mathematics as we know it. Furthermore, such
> > a change would propagate itself, via the observer effect, to the
> > behavior of sub atomic particles via ill-defined quantum-mechanical
> > affects and would likely result in the reversal of the Second Law of
> > Thermodynamics, wherein your refrigerator would end up heating its
> > contents and milk would spontaneously spoil, among other anomalies.
> >
> > For these reasons, you might propose a "quit" keyword.
> >
> > James
> >
>
> You know, some answers simply *must* be saved for posterity....
>
> Mark
> --
> http://mail.python.org/mailman/listinfo/python-list
>



-- 
http://www.goldwatches.com/watches.asp?Brand=14
http://www.jewelerslounge.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070718/60a6bb23/attachment.html>


More information about the Python-list mailing list