Re: [Tutor] Universal error handler

2006-06-20 Thread Matti Niemelä
Thank you all for your replies. > It looks a lot like what you asked for! What do you find > disfunctional? Is it the call to the main function? I'm just trying to find a way not to indent the code more then necessary. Makes it messy. That's just me :) > Chances are you may have already seen

Re: [Tutor] Universal error handler

2006-06-20 Thread Andrew Robert
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 You may also want to try a error handling like this. It is platform clean and uses the system standard logging routines. import os, logging, logging.handlers def eventlogger(level,message): """ Sent trapped events to NT application

Re: [Tutor] Universal error handler

2006-06-20 Thread Emily Fortuna
Hi Matti! Chances are you may have already seen this, but here are a list of the different Python errors you can catch: http://www.python.org/doc/1.5.2p2/api/standardExceptions.html > Just started learning Python, and I was wondering if there is a way to > catch an error or errors (like EOFError

Re: [Tutor] Universal error handler

2006-06-20 Thread Alan Gauld
> Just started learning Python, and I was wondering if there is a way > to catch an error or errors (like EOFError) whenever it occures > during the script? The script (the program) wouldn't have any > handling for that error itself, but a seperate block would handle > that at the start or the

Re: [Tutor] Universal error handler

2006-06-20 Thread Kent Johnson
Matti Niemelä wrote: > Hi! > > Just started learning Python, and I was wondering if there is a way to > catch an error or errors (like EOFError) whenever it occures during the > script? The script (the program) wouldn't have any handling for that > error itself, but a seperate block would handl

[Tutor] Universal error handler

2006-06-20 Thread Matti Niemelä
Hi! Just started learning Python, and I was wondering if there is a way to catch an error or errors (like EOFError) whenever it occures during the script? The script (the program) wouldn't have any handling for that error itself, but a seperate block would handle that at the start or the end o