<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Discussion</title><link href="https://sourceforge.net/p/idlex/discussion/" rel="alternate"/><link href="https://sourceforge.net/p/idlex/discussion/feed.atom" rel="self"/><id>https://sourceforge.net/p/idlex/discussion/</id><updated>2021-06-20T22:43:03.476000Z</updated><subtitle>Recent posts to Discussion</subtitle><entry><title>Export to HTML fails + fix</title><link href="https://sourceforge.net/p/idlex/discussion/general/thread/cbe9293f99/?limit=25#883b" rel="alternate"/><published>2021-06-20T22:43:03.476000Z</published><updated>2021-06-20T22:43:03.476000Z</updated><author><name>Steve</name><uri>https://sourceforge.net/u/stevedaulton/</uri></author><id>https://sourceforge.net7e2bb269f3ecfe46c691c0e0ac33001bf7dd3d92</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Tested on Xubuntu 20.04 with Idle version 3.8.5&lt;br/&gt;
On clicking "Export to HTML" and selecting a file name, an empty HTML file is created.&lt;br/&gt;
This is due to:&lt;br/&gt;
AttributeError: module 'cgi' has no attribute 'escape'&lt;/p&gt;
&lt;p&gt;To fix the problem, change line 88:&lt;br/&gt;
import cgi&lt;br/&gt;
to&lt;br/&gt;
import html&lt;/p&gt;
&lt;p&gt;and line 145 from&lt;br/&gt;
out.append(cgi.escape(content))&lt;br/&gt;
to&lt;br/&gt;
out.append(html.escape(content))&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Run selected line bug</title><link href="https://sourceforge.net/p/idlex/discussion/general/thread/f3b81866e8/?limit=25#949c" rel="alternate"/><published>2021-01-09T18:04:31.318000Z</published><updated>2021-01-09T18:04:31.318000Z</updated><author><name>Michkov</name><uri>https://sourceforge.net/u/michkov/</uri></author><id>https://sourceforge.net9fca62e7431cf58d6e8ae4aec537910c785e26a1</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I've encountered a consistent error when trying to run a block of code that is preceded by a multiline comment block, see attached screenshot. Running the highlighted section leads to the error seen in the shell. Where the triple quote referred to is the second one from the top at the end of the comment block.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Update: IdleX for Ubuntu 20.04 ?</title><link href="https://sourceforge.net/p/idlex/discussion/general/thread/3f753e9526/?limit=25#afae" rel="alternate"/><published>2020-09-19T16:12:23.908000Z</published><updated>2020-09-19T16:12:23.908000Z</updated><author><name>Matthias Sprau</name><uri>https://sourceforge.net/u/speedy-21/</uri></author><id>https://sourceforge.netc4f7b64cedae794d991469da51ce9754596e58cf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi again,&lt;br/&gt;
I tried to use idlex 1.18 with ubuntu 20.4 with the usual &lt;code&gt;python3 idlex.py&lt;/code&gt;. Most of the thinks still works. But if I try the shortcut  'ctrl+N' for a new file, it doesn't work.&lt;br/&gt;
It woulb be nice to have a up-to-date version of Idlex. Not only for me, currently we use idlex 1.18 at a german High school with &amp;gt; 1100 pupils. &lt;br/&gt;
Regards&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Open with idlex, (right click extension) installation fix</title><link href="https://sourceforge.net/p/idlex/discussion/general/thread/a8518f67c7/?limit=25#2b95" rel="alternate"/><published>2019-08-19T06:49:46.658000Z</published><updated>2019-08-19T06:49:46.658000Z</updated><author><name>ZXX</name><uri>https://sourceforge.net/u/zbz/</uri></author><id>https://sourceforge.net8554fe3049019c64826c237a714ffce5eb4e44b5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Did you test with 3.6 and say 3.4 and 2.7?  And then the case when there are both 32 and 64 bit Python installs ? I know why I'm asking. It happened that I installed 3.7 which didn't have reg key setting for IDLE at all, so I downloaded someone's script from the net, and he had the subkey name very different from (apparently default) "Edit with IDLE" which I didn't like so I changed it a bit :-) So I ended up with   shell\IDLEedit\ - totally irregular but it didn't break anything and I was happy. Lo and behold IdleX comes and nails itself agains the wall. So I had to do much more diging than I wanted.&lt;/p&gt;
&lt;p&gt;1 - C:\Python36\Scripts\EditWithIdleX.py looks at the wrong places.&lt;br/&gt;
get_python_executable() goes for HKCR\Python.File\shell\ which will be there if Pythion install was given generous option (for all users), but then createregistrykeyhelper() goes for HKCU\Software\Classes\Python.File\shell which will be there if Pythion install was given selfish option (for current user only). Plus the hardcoded subkey ("Edit with IDLE") which is not guaranteed to exist at all.&lt;/p&gt;
&lt;p&gt;...\Python.File\shell* can have many subkeys (one per version and bitness present) or none at all and can have subkeys that are not Python's (I have SourceInsight there) and may have arbitrary names (...\shell\&amp;lt;X&amp;gt;\MUIVerb gives display string for a clean secondary edit shell setup)&lt;/p&gt;
&lt;p&gt;2 - HKLM\SOFTWARE\Python\PythonCore\&amp;lt;ver&amp;gt; is the proper place to got to for actual path to IDLE and Python itself. It has to do a bit of checking and searching. Has to determine the version and bitness (and comapre to ...\PythonCore\&amp;lt;ver&amp;gt;\SysVersion just to be sure). It wouldn't hurt to check SysArchitecture as well.&lt;/p&gt;
&lt;p&gt;Path to pythonw.exe is at ...\PythonCore\&amp;lt;ver&amp;gt;\InstallPath\WindowedExecutablePath&lt;/p&gt;
&lt;p&gt;3 - The string  ...\command\@ needs to have %L, not %1 (it breaks on some flavors and setups at least under Win10). I don't remember at which point Win introduced %L =&amp;gt; it may need to determine winver if the goal is huge back-compat (probably is).&lt;/p&gt;
&lt;p&gt;4 - IdleX has a private copy of idlelib with idlelib.config changed to idlelib.configHandler and it redirects to it. I didn't have the reason and time to check under which circumstances that goes awry but I was hit by idlexMain.py and extensionManager.py dying  by going for idlelib.configHandler and not finding it - if I was trying to simulate a "run" from IDLE's shell. No problems from plain python's interactive shell. I ended up editing these 2 to go for idlelib.config till the setup was OK and then returning to idlelib.configHandler since idlex wouldn't run with idlelib.config :-)&lt;/p&gt;
&lt;p&gt;Oh and &lt;span&gt;[from idlelib import macosxSupport]&lt;/span&gt; was exploding in idlexMain.py so I moved it under def macosx_workaround(): which gets invoked under try-catch protection =&amp;gt; peace on Earth :-)&lt;/p&gt;
&lt;p&gt;This is how my final registry setup lookes like:&lt;/p&gt;
&lt;p&gt;def _create_registry_key_helper(regval):&lt;br/&gt;
    reg = W.ConnectRegistry(None, W.HKEY_CLASSES_ROOT)&lt;br/&gt;
    root = W.OpenKey(reg, r'Python.File\Shell', 0, W.KEY_WRITE)&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;W.CreateKey(root, r'IdleXedit')
p1 = W.OpenKey(reg, r'Python.File\Shell\IdleXedit', 0, W.KEY_WRITE)
W.SetValueEx(p1, 'MUIVerb', 0, W.REG_SZ, 'Ed&amp;amp;it with IdleX')

W.CreateKey(p1, 'command')    
p2 = W.OpenKey(reg, r'Python.File\Shell\IdleXedit\command', 0, W.KEY_WRITE)
W.SetValue(p2, '', W.REG_SZ, regval)

W.CloseKey(p2)
W.CloseKey(p1)
W.CloseKey(root)
W.CloseKey(reg)
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;with&lt;/p&gt;
&lt;p&gt;def get_python_executable():&lt;br/&gt;
    """ Get path to python.exe """&lt;br/&gt;
    reg = W.ConnectRegistry(None, W.HKEY_CLASSES_ROOT)&lt;br/&gt;
    try:&lt;br/&gt;
        v = W.QueryValue(reg, r'Python.File\shell\Edit with IDLE\command')&lt;br/&gt;
    except:&lt;br/&gt;
        v = W.QueryValue(reg, r'Python.File\shell\IDLEedit\command')&lt;/p&gt;
&lt;p&gt;which is just a hack to patch me through.&lt;/p&gt;
&lt;p&gt;and:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;regval = '"%(python)s" "%(idlex)s" -e "%%L"' % {'python':path_to_python,
                                          'idlex':path_to_idlex}
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;in:&lt;br/&gt;
def build_registry_value():&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Open with idlex, (right click extension) installation fix</title><link href="https://sourceforge.net/p/idlex/discussion/general/thread/a8518f67c7/?limit=25#e3ac" rel="alternate"/><published>2019-05-24T10:09:43.908000Z</published><updated>2019-05-24T10:09:43.908000Z</updated><author><name>David Patterson</name><uri>https://sourceforge.net/u/drp0/</uri></author><id>https://sourceforge.neta075609790e2cb225197abd5f0df71238729c726</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The EditWithIdleX.py script fails in Windows 10 (64 bit)&lt;br/&gt;
This appears to be due to the registry call in function get_python_executable()&lt;br/&gt;
Replacing line:&lt;br/&gt;
p = W.OpenKey(reg, r'Python.File\shell\Edit with IDLE\command')&lt;br/&gt;
With:&lt;br/&gt;
p = W.OpenKey(reg, r'Python.File\Shell\editwithidle\shell\edit37-32\command')&lt;/p&gt;
&lt;p&gt;Allows the installation of the right click context menu option.&lt;/p&gt;
&lt;p&gt;Tested successfully on two seperate PC's&lt;/p&gt;
&lt;p&gt;David&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>How to run IDLEx?</title><link href="https://sourceforge.net/p/idlex/discussion/general/thread/f6f13bb50a/?limit=25#f46a" rel="alternate"/><published>2019-03-19T09:22:04.016000Z</published><updated>2019-03-19T09:22:04.016000Z</updated><author><name>Neskazhui</name><uri>https://sourceforge.net/u/neskazhui/</uri></author><id>https://sourceforge.net4fb7c7f55d38dae5e2e8f1d88fa229da26876cf7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;br/&gt;
I successfully installed IDLEx on Windows10 through command "python setup.py install". But I don't see IDLEx. IDLE has not extension after running. How to run IDLEx?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Need help installing IdleX 1.16 into IDLE 3.7.2 on MacOS 10.13.6 </title><link href="https://sourceforge.net/p/idlex/discussion/general/thread/b7fc041b68/?limit=25#723c" rel="alternate"/><published>2019-03-09T23:28:21.712000Z</published><updated>2019-03-09T23:28:21.712000Z</updated><author><name>Tom Williams</name><uri>https://sourceforge.net/u/tmwilliams949/</uri></author><id>https://sourceforge.net0ce21b242d54f8d39cf5dc0281eb54313c0c1e72</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Roger,&lt;/p&gt;
&lt;p&gt;Thanks for clarifying expectations.  Naturally this isn’t the answer I was hoping for.&lt;/p&gt;
&lt;p&gt;So I’ve spent a couple of days using a web search tool and I’ve found what seem to be errors on the web (which I expect) and in the formal documentation from python.org (which I didn’t expect).&lt;/p&gt;
&lt;p&gt;First, the files didn’t get placed where I expected them per the documentaion.  There’s no Python 3.7 folder in my Applications folder.  Instead there’s IDLE (which brings up Python 3.7) and Python Launcher directly in Applications.  I can only imagine reasons for this.&lt;/p&gt;
&lt;p&gt;Second the notion of holding OPTION while right clicking a file in Finder does NOT bring up a secondary menu offering to copy the full file path to the clipboard (as far as I can tell).  This is supposed to  be true with macOS 10.11 and after but doesn’t seem to be true with my macOS 10.13.&lt;/p&gt;
&lt;p&gt;Sadly there is virtually no documentation on Launcher.  I found a short article on the web that ended as it was about to get to the material I as hoping to find.  So now I’m - frankly - just guessing.&lt;/p&gt;
&lt;p&gt;I’m thinking that if I mark a .py file (or files) to be opened with the Python Launcher, maybe the Launcher will tell the system where to find the Python I want to use.  My Launcher points to something other than Python 3, so I think I need to tell it where to find Python3.&lt;/p&gt;
&lt;p&gt;So I go to Terminal and try ‘which -a python3’ and I get &lt;br/&gt;
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3&lt;/p&gt;
&lt;p&gt;Of course that’s \Library... starting from Macintosh HD, not the \Library starting from my user directory!&lt;/p&gt;
&lt;p&gt;So far, so good.  I track that down in a Finder window and GetInfo shows me that file is an Alias for &lt;br/&gt;
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7&lt;/p&gt;
&lt;p&gt;Well, okay, but THAT file’s GetInfo says it’s of kind Document, not the expected App.  &lt;/p&gt;
&lt;p&gt;I’m kinda stuck for now waiting to get a new idea to try.  Maybe someone can help me puzzle out something that now seems WAY more complicated than it needs to be for a Python learner.  &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Need help installing IdleX 1.16 into IDLE 3.7.2 on MacOS 10.13.6 </title><link href="https://sourceforge.net/p/idlex/discussion/general/thread/b7fc041b68/?limit=25#6ac1" rel="alternate"/><published>2019-03-08T02:28:20.349000Z</published><updated>2019-03-08T02:28:20.349000Z</updated><author><name>Roger</name><uri>https://sourceforge.net/u/serwy/</uri></author><id>https://sourceforge.net211aa7a406fe2fc9f92c629fa90843a8993e898a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Tom,&lt;/p&gt;
&lt;p&gt;IdleX 1.16 does not work with Python 3.6+ due to changes in IDLE itself. IdleX 1.18 contains a fork of the 3.5 IDLE code. You won't be able to move LineNumbers.py into IDLE for your version of Python.&lt;/p&gt;
&lt;p&gt;You should be able to create a launcher to use IdleX instead of IDLE.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br/&gt;
Roger&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Need help installing IdleX 1.16 into IDLE 3.7.2 on MacOS 10.13.6 </title><link href="https://sourceforge.net/p/idlex/discussion/general/thread/b7fc041b68/?limit=25#f7ec" rel="alternate"/><published>2019-03-08T01:06:39.406000Z</published><updated>2019-03-08T01:06:39.406000Z</updated><author><name>Tom Williams</name><uri>https://sourceforge.net/u/tmwilliams949/</uri></author><id>https://sourceforge.net09291d0933fb2e86f2a0c33bc6f9fd385330c124</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I am trying to install the IdleX 1.16 LineNumbers extension into my IDLE 3.7.2 on MacOS 10.13.6.&lt;/p&gt;
&lt;p&gt;I downloaded idlex-1.18.  Documentation didn’t say where to put it so I opened Temiinal and cd’ed into that directory.&lt;/p&gt;
&lt;p&gt;I ran "python3 setup.py install —user” and didn’t see any errors (i saved the output if anyone needs to see it.)&lt;/p&gt;
&lt;p&gt;I can open Terminal cd to Downloads, then to Idlex-1.16, then run ‘python3 idlex.py' and that works fine.&lt;/p&gt;
&lt;p&gt;I’d like to just click the IDLE icon that’s in my taskbar and be able to see line numbers in the code files i open.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;Adding Extensions to Standard IDLE ================================== 
If you want to include an extension in the standard IDLE, 
copy the extension to "idlelib" and then modify 
idlelib/config-extensions.def to include the contents 
of "config_extension_def" found in the extension source code.
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Where is “idlelib”?&lt;/p&gt;
&lt;p&gt;How do I find "the contents of "config_extension_def" found in the extension source code”&lt;/p&gt;
&lt;p&gt;It would be really great to have some usage guidance that’s dumbed down a little so people unfamiliar with the internals of Python and MacOS could follow it.&lt;/p&gt;
&lt;p&gt;Thanks for your work on this and I’m looking forward to being able to use it.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Installation on 18.04 64bit failed</title><link href="https://sourceforge.net/p/idlex/discussion/general/thread/15e21727/?limit=25#8161" rel="alternate"/><published>2018-08-11T17:05:29.575000Z</published><updated>2018-08-11T17:05:29.575000Z</updated><author><name>Roger</name><uri>https://sourceforge.net/u/serwy/</uri></author><id>https://sourceforge.net294b339d17d2b24ed08d9c83f981ec34c2adf289</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Yes, IdleX will work with 3.6/3.7. &lt;/p&gt;&lt;/div&gt;</summary></entry></feed>