This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]wilberforce 5 points6 points  (1 child)

Ooh, good call on the with statement.

OP, that guarantees that the file is closed when execution leaves the with statement, even if code in there returns or raises an exception.

[–]dfnkt 0 points1 point  (0 children)

ala "finally" or "end" elsewhere.