Re: [IronPython] from __future__ import ...

2009-12-14 Thread Lukas Cenovsky
I've found the catch - the __future__.py module is in ironpython\lib folder which is automatically added to path by ipy.exe - that's why it worked from interpreter but not from the ScriptEngine. -- -- Lukáš Michael Foord wrote: __future__ is a standard library module that must be on the path i

Re: [IronPython] from __future__ import ...

2009-12-14 Thread Michael Foord
__future__ is a standard library module that must be on the path in order to do future imports. You must put the directory containing this module (or preferably all the standard library) into sys.path before importing it. The ScriptRuntime or ScriptEngine has a SetSearchPaths method that allo

[IronPython] from __future__ import ...

2009-12-14 Thread Lukas Cenovsky
Hi, I've found that the from __future__ import ... works in .py file run by ipy.exe but not when I create an engine in C#. test.py: from __future__ import division print 'done' test.cs: using Microsoft.Scripting; using Microsoft.Scripting.Hosting; using IronPython.Hosting; namespace TestDut