Please don't post non-text message bodies to discussion forums. Message bodies should be plain text.
"Anthra Norell" <[EMAIL PROTECTED]> writes: > If a piece of code exits with an exception before it closes an open > file, that file seems to remain locked, which is real pain in the > butt You will want to examine the 'finally' clause, which is executed after the 'try' suite regardless of exceptions. <URL:http://docs.python.org/ref/exceptions.html> <URL:http://docs.python.org/ref/try.html#try> You may also be interested in the 'with' statement, coming in Python 2.5, which will be a more natural way of expressing this idiom. <URL:http://docs.python.org/dev/whatsnew/section-generators.html> -- \ "If nature has made any one thing less susceptible than all | `\ others of exclusive property, it is the action of the thinking | _o__) power called an idea" -- Thomas Jefferson | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list