[IronPython] Fails to import IronPythonConsole

Akki Reddy akkireddy.gunta at gmail.com
Sun Mar 22 16:43:53 CET 2009


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 <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>
>
>> 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
>> Users at lists.ironpython.com
>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>>
>>
>
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20090322/3ec8b3ad/attachment.html>


More information about the Ironpython-users mailing list