IronPython 2 targets CPython 2.5 compatibility.  In 2.5, you need the
__future__ line in order to use the "with" statement.  It's quite possible
that this wasn't implemented yet in that alpha or beta of IronPython.

It's in 2.6 where you don't need the "from __future__ import
with_statement".

On Fri, Apr 3, 2009 at 12:01 PM, Adam Brand <ad...@silverkeytech.com> wrote:

> Using IronPython for ASP.Net, trying to use:
> from __future__ import with_statement
>
> ...get the message:
> future feature is not defined:with_statement
>
> Have put the __future__.py file in the directory that py file is in as well
> as my lib folder.
>
> Any ideas? I saw some references to needing to put the switch -X:Python25,
> but I think that was for earlier versions of IPY. AFAIK the IP for 
> ASP.NET<http://asp.net/>is IronPython 2, Alpha 1...I'm thinking that one 
> shouldn't need the switch?
>
>
> Thanks,
> Adam
>
> _______________________________________________
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
_______________________________________________
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to