catching all exceptions

2005-08-13 Thread a_geek
Hello, I'd like to catch all exeptions and be able to inspect them. The simple case: I know which exceptions I'll get: # standard textbook example: try: something() except ThisException, e: print "some error occurred: ", str(e) The not-so-simple case: Handling all other exceptions: #

Re: catching all exceptions [SOLVED]

2005-08-13 Thread a_geek
Hello, Tomasz Lisowski wrote: >> Well, actually the second statement doesn't even compile... any ideas >> why I shouldn't be able to catch "anonymous" exceptions like this, or >> whether and how I can (and only overlooked it)? [ one of three suggestions: ] > Try this: Ok, so the answer simply w

problem with "time"

2005-03-08 Thread a_geek
Hello, I'm writing a small program that needs to check Unix timestamps for falling into an interval (typical usage: ./program 2005-03, you get the idea). Now, I create two time stamps from the user's input to create the interval's borders using mktime(). Trying to check the sanity of my program, I