Hi all,
I’m in the middle of finalizing a new tools pack prior to release and am having some issues getting it compliant with Maya2009 Python2.5
I’ve been using the ‘with’ statement and obviously in 2010 upwards it’s in by default with 2.6 Python. But I’m trying to get it running in 2009 by using the
from future import with_statement
but whatever I do Maya moans, looking like the future import didn’t work? Anybody shed any light on this? I’m getting the following error:
# <maya console>:2: Warning: 'with' will become a reserved keyword in Python 2.6
# Error: ('invalid syntax', ('<maya console>', 2, 9, 'with open(test, "r") as fileStream:
'))
# File "<maya console>", line 1
# with open(test, "r") as fileStream:
# ^
thanks guys
Red