This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients JayKrish, Saimadhav.Heblikar, Todd.Rovito, jesstess, ned.deily, rhettinger, roger.serwy, serhiy.storchaka, taleinat, terry.reedy
Date 2014-08-16.00:19:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1408148383.89.0.828388853399.issue17535@psf.upfronthosting.co.za>
In-reply-to
Content
As Terry requested, here are a few comments on running linenumber-text-widget-v1.diff on OS X.  Overall, this looks to me to be a useful option.

1. Having line numbering enabled by default was a bit of a surprise, particularly in light of 2.

2. The "Toggle Linenumbering" menu item should be in the Options menu cascade, not the Window(s) one.  I believe Options is where other extensions add their menu items.  Initially, I could see no way to disable line numbering without knowing how to create, if necessary, and edit ~/.idlerc/config-extensions.cfg, which presumable few users do.  Only later did I stumble across the "Toggle Linenumbering" menu option in the Window menu cascade.  As an OS X user, I would never have thought to look there; normally on OS X, that menu cascade is limited to options related to selecting windows or tabs and selected options related to them, like Zoom or Minimize.  (Presumably, the edit extensions preferences feature will help provide another, standard way for the user to deal with this in the long run.)  

3. I found the default color values made the line numbers difficult to read.  Perhaps a better default would be fgcolor=White instead of Black when bgcolor=Gray?

4. The extension fails to load with Tk 8.4.x:
    _tkinter.TclError: unknown option "-inactiveselectbackground"

It appears that option is new in Tk 8.5:
        http://www.tcl.tk/man/tcl8.4/TkCmd/text.htm
        http://www.tcl.tk/man/tcl8.5/TkCmd/text.htm#M-inactiveselectbackground

I'm not sure what to recommend here.  Eventually, 8.4.x usage will slowly fade away so demanding that IDLE, especially extensions, not depend on any post-8.4 features may be a too-restrictive constraint.  Perhaps it is OK to just test for pre-8.5 at extension initialization and cleanly skip if Tk is too old.

5. The LineNumber extension should be added to the list of default extensions in the IDLE Help file (Lib/idlelib/help.txt) and the IDLE section of the Library Reference (Doc/library/idle.rst).  Also add the "Toggle Linenumbering" menu item.

6. The LineNumber extension config-extensions.def options need to be documented for the user (this is a generic issue for IDLE extensions).  For example, I would not have had any clue that it was possible to enable line numbers for the shell window without examining the file and noticing the "enable_shell=0" hint.

(Noted in passing: while the help/doc suggests: "See the beginning of config-extensions.def in the idlelib directory for further information.", even in the unlikely event that a user knew in what directory to look for it, it's not possible to open that file in an IDLE editor window with the current default Cocoa Tk's since Cocoa Tk does not provide a filter option on the open window; only .py* and .txt files can be opened.)
History
Date User Action Args
2014-08-16 00:19:44ned.deilysetrecipients: + ned.deily, rhettinger, terry.reedy, taleinat, roger.serwy, jesstess, Todd.Rovito, serhiy.storchaka, JayKrish, Saimadhav.Heblikar
2014-08-16 00:19:43ned.deilysetmessageid: <1408148383.89.0.828388853399.issue17535@psf.upfronthosting.co.za>
2014-08-16 00:19:43ned.deilylinkissue17535 messages
2014-08-16 00:19:41ned.deilycreate