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 terry.reedy
Recipients Ramchandra Apte, fgracia, roger.serwy, terry.reedy
Date 2013-02-21.21:58:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1361483938.44.0.335946822101.issue16233@psf.upfronthosting.co.za>
In-reply-to
Content
Conceptual problems indeed. I never tried the 'class browser' because I mostly write modules with functions, not classes. Nonetheless, to see what this issue is about, I just tried it with one of my function-only files, expecting to see an empty 'show', whatever that would be. Instead I see new window with a nice listing of all the function definitions in the file.

& xxx.py
|- & def a(...)
|- & def b(...)
(& is a green Python snake)

But why must the file be open? Left click, right click, left double click, and the answer appears. The cursor in the open edit window moves to the corresponding def line, which is highlighted. So this is not just a class browser, but a module file navigator. This is a real gem that I should have been using, and would have if it were properly labeled and documented. I think the help/manual entry should be something like

Module Browser -- Summarize the function, class, and method statements in a opened module file with a tree structure in an auxiliary window. Double clicking on any line in the tree activates the corresponding edit window, moves its cursor to the beginning of the corresponding def or class statement, and highlights the first line of that statement.

(I did check that lambda expressions are ignored.)

Since this feature can almost never be useful in PyShell, I agree that 'Module Browser' (or whatever new name we choose) should best not be present, or grayed out, or always fail with a shell specific message. But it seems that while shell and edit windows each have some main menu entries that the other does not, the submenus present in each are the same, so this might not be trivial (or the context specific message might be the easiest change).

I think we can further improve the error message. I think 'this edit window' would be clearer that 'this buffer'. I think it should also specify that it only works with python module file. If someone who is editing a new non-Python file follows the instruction to save and try again, they will only be frustrated.

I have two complaints about the browser window itself. The first is that the line spacing is not adjusted for my larger than default font (which I need for my less than 'default' vision). Consequently, each line cuts off the bottoem of the chars in the line above. This is a bug.

The other is that the green snake at the beginning of *every* line is just distracting visual noise. The one before xxx.py is enough.

I think all the mentioned changes can go in all current versions.
History
Date User Action Args
2013-02-21 21:58:58terry.reedysetrecipients: + terry.reedy, roger.serwy, Ramchandra Apte, fgracia
2013-02-21 21:58:58terry.reedysetmessageid: <1361483938.44.0.335946822101.issue16233@psf.upfronthosting.co.za>
2013-02-21 21:58:58terry.reedylinkissue16233 messages
2013-02-21 21:58:57terry.reedycreate