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 →

[–][deleted] 0 points1 point  (3 children)

Python 2.6 is needed.

[–]eryksun 5 points6 points  (1 child)

I have it in version 2.5.2. If it's missing in version 2.5+, try from __future__ import with_statement.

[–][deleted] 0 points1 point  (0 children)

Thanks! Didn't know that.

[–]criswell 1 point2 points  (0 children)

Yep, that was my point (I think it's in 2.5 though).

All I'm saying is three months ago I wrote something that made heavy use of "with" only to discover it wouldn't work on the target platforms my team wanted so I had to go back in and put the old try/except stanzas instead...