Re: How to swallow traceback message

2010-08-11 Thread Peter Otten
Back9 wrote: > I run my py app to display a file's contents, and it is normally very > long. > So I use it like below: > > python myapp.py input_file | more > to see them step by step. > > But when I try to exit it, normally I use Ctrl+ C key to quit it. > Problem is every time I do like it, it

Re: How to swallow traceback message

2010-08-11 Thread Tim Harig
On 2010-08-11, Back9 wrote: > On Aug 11, 11:19 am, Tim Harig wrote: >> On 2010-08-11, Back9 wrote: >> > But when I try to exit it, normally I use Ctrl+ C key to quit it. >> > Problem is every time I do like it, it shows Traceback message and it >> > makes my app not professional. >> >> You have

Re: How to swallow traceback message

2010-08-11 Thread Michael Torrie
On 08/11/2010 09:32 AM, Back9 wrote: > I should have mentioned that I already use try/except > KeyboardInterrupt statement. > But it does not seem to work as I expected. If you want anyone to help further, you will need to say a) what you are expecting it to do and b) what it is actually doing. --

Re: How to swallow traceback message

2010-08-11 Thread Back9
On Aug 11, 11:19 am, Tim Harig wrote: > On 2010-08-11, Back9 wrote: > > > python myapp.py input_file | more > > to see them step by step. > > > But when I try to exit it, normally I use Ctrl+ C key to quit it. > > Problem is every time I do like it, it shows Traceback message and it > > makes my

Re: How to swallow traceback message

2010-08-11 Thread Jean-Michel Pichavant
Back9 wrote: Hi, I run my py app to display a file's contents, and it is normally very long. So I use it like below: python myapp.py input_file | more to see them step by step. But when I try to exit it, normally I use Ctrl+ C key to quit it. Problem is every time I do like it, it shows Traceb

Re: How to swallow traceback message

2010-08-11 Thread Eknath Venkataramani
See Exception Handling On Wed, Aug 11, 2010 at 11:09 AM, Back9 wrote: > Hi, > > I run my py app to display a file's contents, and it is normally very > long. > So I use it like below: > > python myapp.py input_file | more > to see them step by ste

Re: How to swallow traceback message

2010-08-11 Thread Tim Harig
On 2010-08-11, Back9 wrote: > python myapp.py input_file | more > to see them step by step. > > But when I try to exit it, normally I use Ctrl+ C key to quit it. > Problem is every time I do like it, it shows Traceback message and it > makes my app not professional. You have three options.