I have to open & write to about 10 different files all within the same loop. e.g:
for i in range(0,10): try: a=5 file1 = open(\"file1.txt
Use the traceback module:
traceback.print_exc()