Ned Deily added the comment:

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.)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17535>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to