Interesting. I didn't realize that pyreadline had specific IronPython support.
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 <[email protected]> > Hi Curt, > > Thanks for a prompt response. > > > The usage in python\pyreadline\pyreadline\console\ironpython_console.py is > as follows: > > import clr,sys > clr.AddReferenceToFileAndPath(sys.executable) > import IronPythonConsole > > ... > ... > ... > > class IronPythonWrapper(IronPythonConsole.IConsole): > def ReadLine(self,autoIndentSize): > return hook_wrap() > def Write(self,text, style): > System.Console.Write(text) > def WriteLine(self,text, style): > System.Console.WriteLine(text) > 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? > > > Thanks, > Akki. > > 2009/3/22 Curt Hagenlocher <[email protected]> > > 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 <[email protected]> >> >>> Hi, >>> 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 >>> clr.AddReferenceToFileAndPath(sys.executable) >>> 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, >>> Akki. >>> >>> _______________________________________________ >>> Users mailing list >>> [email protected] >>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >>> >>> >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >> >> > > _______________________________________________ > Users mailing list > [email protected] > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > >
_______________________________________________ Users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
