Re: how to stop python

2006-08-02 Thread Laurent Pointal
victor a écrit : or if u want explicit exit of program then use: import sys sys.exit(1) or raise SystemExit, 'message' There is also the (not recommanded - see docs, but it exists) os._exit(n) function. A+ Laurent. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to stop python

2006-07-31 Thread victor
or if u want explicit exit of program then use: import sys sys.exit(1) or raise SystemExit, 'message' Dan wrote: bruce bedouglas at earthlink.net posted: perl has the concept of die. does python have anything similar. how can a python app be stopped? I see this sort of statement a

re: how to stop python

2006-07-30 Thread Dan
bruce bedouglas at earthlink.net posted: perl has the concept of die. does python have anything similar. how can a python app be stopped? I see this sort of statement a lot in Perl: open(FH, myfile.txt) or die (Could not open file); I've no idea why you're asking for the Python

Re: how to stop python...

2006-07-03 Thread John Machin
On 3/07/2006 2:27 PM, bruce wrote: hi... perl has the concept of die. does python have anything similar. how can a python app be stopped? the docs refer to a sys.stop.. but i can't find anything else... am i missing something... Inter alia, sys.exit() and a functional Shift key. --

Re: how to stop python...

2006-07-03 Thread [EMAIL PROTECTED]
Wow, so many people with the same solution... where's the creativity folks? Whenever sys.exit() doesn't work for me, I find that a good solid thump on the side of the computer case with a large mallet tends to do the job. And there's always threatening the computer with a degaussing gun! --

Re: how to stop python...

2006-07-03 Thread Paul Rubin
[EMAIL PROTECTED] [EMAIL PROTECTED] writes: Wow, so many people with the same solution... where's the creativity folks? Whenever sys.exit() doesn't work for me, I find that a good solid thump on the side of the computer case with a large mallet tends to do the job. And there's always

Re: how to stop python...

2006-07-02 Thread Tim Peters
[bruce] perl has the concept of die. does python have anything similar. how can a python app be stopped? the docs refer to a sys.stop. Python docs? Doubt it ;-) but i can't find anything else... am i missing something... import sys print sys.exit.__doc__ exit([status]) Exit the

Re: how to stop python...

2006-07-02 Thread Alex Martelli
bruce [EMAIL PROTECTED] wrote: hi... perl has the concept of die. does python have anything similar. how can a python app be stopped? the docs refer to a sys.stop.. but i can't find anything else... am i missing something... import sys sys.exit() Alex --

Re: how to stop python...

2006-07-02 Thread Simon Forman
bruce wrote: hi... perl has the concept of die. does python have anything similar. how can a python app be stopped? the docs refer to a sys.stop.. but i can't find anything else... am i missing something... thanks -bruce What you want is sys.exit() See:

Re: how to stop python...

2006-07-02 Thread Paul McGuire
bruce [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hi... perl has the concept of die. does python have anything similar. how can a python app be stopped? the docs refer to a sys.stop.. but i can't find anything else... am i missing something... thanks -bruce (From the