Re: Retrieving a stacktrace from an exception object / forwarding an exception

2007-06-22 Thread alg
Use the traceback module: def log_exception(): """This function will log the current exception's traceback to logfile """ import traceback f = open("logfile", 'a') traceback.print_exc(32, f) f.close() def my_func(): raise Exception def wrapper(): try:

Re: REALLY need help with iterating a list.

2007-06-11 Thread alg
Reverse iteration should do the trick, if I understand your problem: for server in reversed(serverlist): ... else: serverlist.remove(server) On Jun 11, 11:30 am, Radamand <[EMAIL PROTECTED]> wrote: > This has been driving me buggy for 2 days, i need to be able to > iterate a l