[IronPython] Compiling IronPythonConsole.exe
Lepisto, Stephen P
stephen.p.lepisto at intel.com
Wed May 6 21:20:32 CEST 2009
Andrew, based on your traceback output, I reconstructed the problem on my system and I get a similar error with IronPython 2.0.1 when trying to import readline. However, on my system, I get the following error:
>>> import sys
>>> sys.path.append(r"c:\python25\Lib\site-packages")
>>> import readline
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\python25\Lib\site-packages\readline\__init__.py", line 1, in c:\python25\Lib\site-packages\readline\__init__.py
File "c:\python25\Lib\site-packages\readline\PyReadline.py", line 12, in c:\python25\Lib\site-packages\readline\PyReadline.py
ImportError: No module named win32con
The win32con module is a .pyd module in python25. IronPython 2.0 cannot load .pyd modules.
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Andrew Evans
Sent: Wednesday, May 06, 2009 11:30 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Compiling IronPythonConsole.exe
hmm same error
No Module named IronPythonConsole
I removed everything related to that but I still get that error in the same file
I am confused... it doesn't seem like my system is cached I have rebooted now several times....
anyway here is the exact error I really appreciate your help so far :-)
IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.3053
Type "help", "copyright", "credits" or "license" for more information.
>>> import readline
Traceback (most recent call last):
File "C:\Python25\Lib\site-packages\pyreadline\console\__init__.py", line 8, i
n C:\Python25\Lib\site-packages\pyreadline\console\__init__.py
File "C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py",
line 28, in C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console
.py
File "", line unknown, in <module>
File "Snippets.scripting", line unknown, in Initialize
File "Snippets.scripting", line unknown, in Initialize
File "Snippets.scripting", line unknown, in Initialize
File "Snippets.scripting", line unknown, in Initialize
ImportError: No module named IronPythonConsole
>>>
On Wed, May 6, 2009 at 10:54 AM, Dino Viehland <dinov at microsoft.com<mailto:dinov at microsoft.com>> wrote:
IConsole now lives in Microsoft.Scripting.Hosting.Shell, so you should be able to change this to:
clr.AddReference('Microsoft.Scripting')
...
from Microsoft.Scripting.Hosting.Shell import IConsole
class IronPythonWrapper(IConsole):
From: users-bounces at lists.ironpython.com<mailto:users-bounces at lists.ironpython.com> [mailto:users-bounces at lists.ironpython.com<mailto:users-bounces at lists.ironpython.com>] On Behalf Of Andrew Evans
Sent: Wednesday, May 06, 2009 10:48 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Compiling IronPythonConsole.exe
Hi the ironpython_console.py comes from pyreadine in the folder "pyreadline/console/ironpython_console.py"
the file itself in the areas where IronPythonConsole are referenced are
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()
I have not been able to find an updated pyreadline I have attached the file in question
to see which module I am refering to see http://ipython.scipy.org/moin/PyReadline/Intro
*cheers
And thank you
On Wed, May 6, 2009 at 10:39 AM, Dino Viehland <dinov at microsoft.com<mailto:dinov at microsoft.com>> wrote:
Where does ironpython_console.py come from? There is no IronPythonConsole class anymore so knowing what exactly the .py file is trying to do would be helpful. But likely you want to map existing things we're looking for into the Microsoft.Scripting.Hosting.Shell namespace which lives in Microsoft.Scripting.dll.
From: users-bounces at lists.ironpython.com<mailto:users-bounces at lists.ironpython.com> [mailto:users-bounces at lists.ironpython.com<mailto:users-bounces at lists.ironpython.com>] On Behalf Of Andrew Evans
Sent: Wednesday, May 06, 2009 10:30 AM
To: users at lists.ironpython.com<mailto:users at lists.ironpython.com>
Subject: Re: [IronPython] Compiling IronPythonConsole.exe
Hello maybe I should explain I have been trying to get readline to work with no success
import readline fails with this message "No Module Named IronPythonConsole"
the line in question is in the file "ironpython_console.py"
import clr,sys
clr.AddReferenceToFileAndPath(sys.executable)
import IronPythonConsole
Just thought at this moment do I need to add anything to my environment variables?
it was mentioned on the readline web site to post here hope some one can help
*cheers
Andrew
using readline in IronPython produces and an error "no mo
On Wed, May 6, 2009 at 10:19 AM, curtin at acm.org<mailto:curtin at acm.org> <brian.curtin at gmail.com<mailto:brian.curtin at gmail.com>> wrote:
On Wed, May 6, 2009 at 10:53, Andrew Evans <andrew.canit at gmail.com<mailto:andrew.canit at gmail.com>> wrote:
Hello list I am new here :-)
I am trying to figure out how to get IronPythonConsole.exe as I need it for Pyreadline... I am using 2.01 version of IronPython
I have tried compiling from source to but to no avail. Is IronPythonConsole obsolete?
Thanks in
Advance
_______________________________________________
Users mailing list
Users at lists.ironpython.com<mailto:Users at lists.ironpython.com>
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
The specific error(s) you received would be helpful.
_______________________________________________
Users mailing list
Users at lists.ironpython.com<mailto:Users at lists.ironpython.com>
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
Users mailing list
Users at lists.ironpython.com<mailto:Users at lists.ironpython.com>
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
Users mailing list
Users at lists.ironpython.com<mailto: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/20090506/ec2eb6fe/attachment.html>
More information about the Ironpython-users
mailing list