Hello Ive tried implementing what you suggested with no success<br><br>I have attached the source just in case you or anyone can shed some light on it<br><br>Cheers<br><br>&gt;&gt;&gt; import readline<br>Traceback (most recent call last):<br>
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;<br>  File &quot;C:\Users\Can IT\Desktop\readline.py&quot;, line 4, in C:\Users\Can IT\Desktop<br>\readline.py<br>  File &quot;C:\Python25\Lib\site-packages\pyreadline\__init__.py&quot;, line 9, in C:\Pyt<br>
hon25\Lib\site-packages\pyreadline\__init__.py<br>  File &quot;C:\Python25\Lib\site-packages\pyreadline\rlmain.py&quot;, line 477, in C:\Pyt<br>hon25\Lib\site-packages\pyreadline\rlmain.py<br>  File &quot;C:\Python25\Lib\site-packages\pyreadline\console\ironpython_console.py&quot;,<br>
 line 408, in install_readline<br>TypeError: expected IConsole, got type<br>&gt;&gt;&gt;<br><br><br><br><br><div class="gmail_quote">On Wed, May 6, 2009 at 2:48 PM, Dino Viehland <span dir="ltr">&lt;<a href="mailto:dinov@microsoft.com">dinov@microsoft.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">








<div link="blue" vlink="purple" lang="EN-US">

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">This one’s a little more complex.  It looks like there’s no
longer a writable IConsole property.  Instead it looks like you need to create
a PythonCommandLine object and then pass in a ScriptEngine, an IConsole, and a
ConsoleOptions object.  That’d look something like:</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">import clr</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">clr.AddReference(‘IronPython’)</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">clr.AddReference(‘Microsoft.Scripting’)</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">from IronPython.Hosting import PythonCommandLine,
PythonConsoleOptions, Python</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">cmdLine = PythonCommandLine()</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">cmdLine.Run(Python.CreateEngine(), IronPythonWrapper,
PythonConsoleOptions())</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">When you call Run here that will then start the interactive
interpreter loop – I’m not sure if that’s exactly what you want.  This is also
going to create a 2<sup>nd</sup> IronPython engine because you can’t really get
to the current ScriptEngine from within IronPython itself – again there could
be reasons why you wouldn’t want this to happen.</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">If you’ve got suggestions on what you’d like the APIs to look
like for this scenario let us know </span><span style="font-size: 11pt; font-family: Wingdings; color: rgb(31, 73, 125);">J</span><span style="font-size: 11pt; color: rgb(31, 73, 125);"></span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<div style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0in 0in 0in 4pt;">

<div>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">

<p><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> <a href="mailto:users-bounces@lists.ironpython.com" target="_blank">users-bounces@lists.ironpython.com</a>
[mailto:<a href="mailto:users-bounces@lists.ironpython.com" target="_blank">users-bounces@lists.ironpython.com</a>] <b>On Behalf Of </b>Andrew Evans<br>
<b>Sent:</b> Wednesday, May 06, 2009 1:36 PM<div class="im"><br>
<b>To:</b> Discussion of IronPython<br>
<b>Subject:</b> Re: [IronPython] Compiling IronPythonConsole.exe</div></span></p>

</div>

</div>

<p> </p>

<p style="margin-bottom: 12pt;">Hello</p><div><div></div><div class="h5"><br>
<br>
pyreadline plays an important part in scapy (<a href="http://www.secdev.org/projects/scapy/" target="_blank">http://www.secdev.org/projects/scapy/</a>)
which is what I am porting to IronPython. My reason for this is well I like a
challenge. That&#39;s the only reason as self serving as that may seem :-P<br>
<br>
Thats the result of my console<br>
<br>
Welcome to Scapy (1.2.0.2-win)<br>
☺←[34m←[1m☻&gt;&gt;&gt; ☺←[0m☻<br>
<br>
<br>
I am not 100 % sure I implented this line correct<br>
<br>
&quot;MyConsole = IronPythonWrapper()&quot;<br>
<br>
which was previously<br>
<br>
IronPythonConsole.PythonCommandLine.MyConsole = IronPythonWrapper()<br>
<br>
maybe more experienced people can shed a light on this<br>
<br>
when that is solved I can submit a patch :-) I would be happy to<br>
<br>
<br>
</div></div><div><div></div><div class="h5">

<div>

<p>On Wed, May 6, 2009 at 1:20 PM, Jörgen Stenarson &lt;<a href="mailto:jorgen.stenarson@bostream.nu" target="_blank">jorgen.stenarson@bostream.nu</a>&gt;
wrote:</p>

<p>Andrew Evans skrev:</p>

<div>

<blockquote style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204, 204, 204); border-width: medium medium medium 1pt; padding: 0in 0in 0in 6pt; margin-left: 4.8pt; margin-right: 0in;">


<p> </p>

<p style="margin-bottom: 12pt;">Hey Stephen thank you<br>
<br>
You solved my problem (I had copied pyreadline from previously to the
ironpython folder.) I modified the file in  the ironpython folder...
modifying it in the default directory in C:\Python25 fixed it<br>
<br>
Thank You :-)</p>

</blockquote>

<p> </p>

</div>

<p>Andrew,<br>
<br>
I&#39;m happy to see that someone is trying to use pyreadline (I&#39;m the maintainer
of pyreadline) on ironpython. I have not tried it myself for a long time so I
have no idea how much bitrot has crept into it. If you have any patches to make
it work out of the box I would be happy to include it.<br>
<br>
Please file any patches via the bugtracker:<br>
<a href="https://bugs.launchpad.net/pyreadline" target="_blank">https://bugs.launchpad.net/pyreadline</a><br>
<br>
We use the ipython lists to discuss pyreadline<br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<span style="color: rgb(136, 136, 136);"><br>
<br>
/Jörgen</span></p>

<div>

<div>

<p><br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com" target="_blank">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a></p>

</div>

</div>

</div>

<p> </p>

</div></div></div>

</div>

</div>


<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
<br></blockquote></div><br>