<br><br><div><span class="gmail_quote">On 8/7/07, <b class="gmail_sendername">Tal Einat</b> &lt;<a href="mailto:taleinat@gmail.com">taleinat@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On 8/7/07, Jameson Chema Quinn &lt;<a href="mailto:jquinn@cs.oberlin.edu">jquinn@cs.oberlin.edu</a>&gt; wrote:<br>&gt; I&#39;m hacking at my own version of IDLE to try to implement language support<br>&gt; in Python. I found a bug.
<br>&gt;<br>&gt; 1. The bug.<br>&gt; I&#39;m using IDLE to work on a copy of IDLE in my home directory. I copy the<br>&gt; idlelib directory to ~/jqidlelib , add &quot;jq&quot; to lines 2 and 22 of idle.py,<br>&gt; open it in IDLE, and start hacking on the other files. If a hacked version
<br>&gt; of some other module is not open in IDLE and I press F5 to run idle.py, I<br>&gt; get the desired behaviour (the modules are loaded from my hacked copies) but<br>&gt; the error display is wacky. Errors refer to the line numbers of my hacked
<br>&gt; versions, but they give the path and code snippets from the actual IDLE<br>&gt; directory.<br><br>If you do a directory-wide search for &#39;idlelib&#39; you&#39;ll find that it is<br>mentioned in PyShell.py as well. I haven&#39;t tried this myself, so
<br>please inform us whether or not this works :)</blockquote><div><br>Changing it there has no effect. In the intervening time, I&#39;m getting even weirder behavior: with my hacked EditorWindow open, I fix the bug in my code and save it. Then I press F5 in the 
idle.py window again. I get:<br><br>Traceback (most recent call last):<br>&nbsp; File &quot;/home/compaq/jqidlelib/idle.py&quot;, line 22, in &lt;module&gt;<br>&nbsp;&nbsp;&nbsp; jqidlelib.PyShell.main()<br>&nbsp; File &quot;/usr/lib/python2.5/idlelib/PyShell.py&quot;, line 1406, in main
<br>&nbsp;&nbsp;&nbsp; return # couldn&#39;t open shell<br>&nbsp; File &quot;/usr/lib/python2.5/idlelib/PyShell.py&quot;, line 275, in open_shell<br>&nbsp;&nbsp;&nbsp; self.pyshell = PyShell(self)<br>&nbsp; File &quot;/usr/lib/python2.5/idlelib/PyShell.py&quot;, line 813, in __init__
<br>&nbsp;&nbsp;&nbsp; OutputWindow.__init__(self, flist, None, None)<br>&nbsp; File &quot;idlelib/OutputWindow.py&quot;, line 16, in __init__<br>&nbsp;&nbsp;&nbsp; EditorWindow.__init__(self, *args)<br>&nbsp; File &quot;/home/compaq/jqidlelib/EditorWindow.py&quot;, line 56, in __init__
<br>&nbsp;&nbsp;&nbsp; if EditorWindow.help_url is None:<br>NameError: global name &#39;trns&#39; is not defined<br><br>The &quot;trns&quot; is from the previous version of EditorWindow which NO LONGER EXISTS on the disk, which is why the code snippet doesn&#39;t mention it. Also, note that the paths for the call stack show a mix between idlelib and jqidlelib, depending on which files I have open. This is just FALSE - all modules are actually being loaded from jqidlelib, as I can easily tell if I introduce a syntax error and then close the file.
<br></div><br>Meanwhile, I can work around by just closing and reopening idle. Annoying, though.<br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&gt; 2. My idea<br>&gt; [snip]<br><br>Awesome! I&#39;ll be glad to answer any questions you might have regarding<br>IDLE&#39;s internals.<br><br>An early pointer: IDLE doesn&#39;t currently allow unicode input, so<br>you&#39;ll have to rework that bit if you want unicode input support.
</blockquote><div><br>I can afford to wait on that, as my first test case is Spanish, and Idle only has minor complaints about accents. Thanks for the heads up, though - this will need to be fixed for py3k anyway, what&#39;s the status on that?
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Good luck, and please keep us posted on developments,<br>- Tal<br></blockquote>
</div>Thanks,<br>Jameson<br><br>ps. here&#39;s my idle version stuff:<br>Python 2.5.1 (r251:54863, May&nbsp; 2 2007, 16:56:35) <br>[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2<br>Type &quot;copyright&quot;, &quot;credits&quot; or &quot;license()&quot; for more information.
<br><br>&nbsp;&nbsp;&nbsp; ****************************************************************<br>&nbsp;&nbsp;&nbsp; Personal firewall software may warn about the connection IDLE<br>&nbsp;&nbsp;&nbsp; makes to its subprocess using this computer&#39;s internal loopback<br>
&nbsp;&nbsp;&nbsp; interface.&nbsp; This connection is not visible on any external<br>&nbsp;&nbsp;&nbsp; interface and no data is sent to or received from the Internet.<br>&nbsp;&nbsp;&nbsp; ****************************************************************<br>&nbsp;&nbsp;&nbsp; <br>IDLE 
1.2.1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ==== No Subprocess ====<br>