Re: Problems trying to hook own exception function to sys.excepthook

2008-04-06 Thread Peter Otten
Sami wrote: > Does this mean that one should always use the command line to run a > python program? Yes. Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems trying to hook own exception function to sys.excepthook

2008-04-06 Thread Sami
Peter Otten wrote: > Sami wrote: > >> Hello, >> >> I am new to Python. >> >> I tried to hook my own ExceptionPrintingFunction sys.excepthook but it >> does not work. >> >> This is what I wrote: >> --- >> import sys >> >> def MyOwn

Re: Problems trying to hook own exception function to sys.excepthook

2008-04-06 Thread Peter Otten
Sami wrote: > Hello, > > I am new to Python. > > I tried to hook my own ExceptionPrintingFunction sys.excepthook but it > does not work. > > This is what I wrote: > --- > import sys > > def MyOwnExceptHook(typ, val, tb): > pri

Problems trying to hook own exception function to sys.excepthook

2008-04-06 Thread Sami
Hello, I am new to Python. I tried to hook my own ExceptionPrintingFunction sys.excepthook but it does not work. This is what I wrote: --- import sys def MyOwnExceptHook(typ, val, tb): print "Inside my own hook" sys.e