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
-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
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
> 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
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
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