On Sun, May 05, 2013 at 09:24:30PM -0700, Jim Mooney wrote:
> I've noticed that if you exit() a program you always get a traceback message:
Which exit are you talking about? There is sys.exit, and there is also
the interactive exit() function defined by the site module for
interactive use.
>
On 06/05/13 05:24, Jim Mooney wrote:
I've noticed that if you exit() a program you always get a traceback message:
Traceback (most recent call last):
File "", line 1, in
exit('what now?')
File "C:\Python33\lib\site.py", line 380, in __call__
raise SystemExit(code)
Only within I
On Mon, May 6, 2013 at 1:12 AM, Zachary Ware
wrote:
> If you don't care about the exit code, you can just "drop off" the end
> of the script. If you don't end with an unhandled exception, your
> exit code will be 0, otherwise it will (probably) be 1.
You can also exit with a message and an exit
On Sun, May 5, 2013 at 11:24 PM, Jim Mooney wrote:
>
> I've noticed that if you exit() a program you always get a traceback message:
> Traceback (most recent call last):
> File "", line 1, in
> exit('what now?')
> File "C:\Python33\lib\site.py", line 380, in __call__
> raise SystemExi
On Mon, May 6, 2013 at 2:56 PM, Jim Mooney wrote:
>> Something like this?
>>
import sys
> while 1:
>> ... sys.exit('Exiting from Infinite Loop')
>> ...
>> Exiting from Infinite Loop
>
> I still get a traceback message from the console. I just want a clean
> exit without that. I have a
> Something like this?
>
>>> import sys
while 1:
> ... sys.exit('Exiting from Infinite Loop')
> ...
> Exiting from Infinite Loop
I still get a traceback message from the console. I just want a clean
exit without that. I have a feeling I'm thinking about something the
wrong way ;')
Traceb
On Mon, May 6, 2013 at 2:24 PM, Jim Mooney wrote:
> I've noticed that if you exit() a program you always get a traceback message:
> Traceback (most recent call last):
> File "", line 1, in
> exit('what now?')
> File "C:\Python33\lib\site.py", line 380, in __call__
> raise SystemExit(c
I've noticed that if you exit() a program you always get a traceback message:
Traceback (most recent call last):
File "", line 1, in
exit('what now?')
File "C:\Python33\lib\site.py", line 380, in __call__
raise SystemExit(code)
What if you just want to exit for some normal reason and