[IronPython] Fails to import IronPythonConsole
curt at hagenlocher.org
Sun Mar 22 17:50:53 CET 2009
Interesting. I didn't realize that pyreadline had specific IronPython
In 2.0, the way to hook input and output is through the DLR hosting
interfaces -- through ScriptRuntime.IO. There may be quite a few changes
required to adapt this. Have you asked the pyreadline maintainers if they
have a 2.0-compatible version?
2009/3/22 Akki Reddy <akkireddy.gunta at gmail.com>
> Hi Curt,
> Thanks for a prompt response.
> The usage in python\pyreadline\pyreadline\console\ironpython_console.py is
> as follows:
> import clr,sys
> import IronPythonConsole
> class IronPythonWrapper(IronPythonConsole.IConsole):
> def ReadLine(self,autoIndentSize):
> return hook_wrap()
> def Write(self,text, style):
> def WriteLine(self,text, style):
> IronPythonConsole.PythonCommandLine.MyConsole = IronPythonWrapper()
> This is from a third party python package. Can I replace it with any
> available console functionality from the latest IronPython?
> 2009/3/22 Curt Hagenlocher <curt at hagenlocher.org>
> You can import "clr" under CPython? Neat! :P
>> I don't believe there's a namespace called IronPythonConsole in IronPython
>> 2. What specifically are you trying to use from that namespace?
>> 2009/3/22 Akki Reddy <akkireddy.gunta at gmail.com>
>>> I have installed IronPython 2.0.1. We have a project running under
>>> CPython, but fails to run under IronPython.
>>> It is fails import the module IronPythonConsole.
>>> The script contains the following lines:
>>> import clr,sys
>>> import IronPythonConsole
>>> The script fails with the following error when running under IronPython:
>>> ImportError: No module named IronPythonConsole
>>> Does anybody know how to resolve this issue?
>>> Thanks in advance,
>>> Users mailing list
>>> Users at lists.ironpython.com
>> Users mailing list
>> Users at lists.ironpython.com
> Users mailing list
> Users at lists.ironpython.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironpython-users