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.

classification
Title: Better path handling in Idle find in files
Type: enhancement Stage: resolved
Components: IDLE Versions: Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: IDLE: always display full grep path
View: 36323
Assigned To: terry.reedy Nosy List: terry.reedy
Priority: normal Keywords:

Created on 2014-07-11 19:10 by terry.reedy, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (1)
msg222779 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2014-07-11 19:10
I propose two interrelated changes for path handling in Idle's Find in Files feature (Alt-F3).

1. If I hit Alt-F3 in an editor window, the 'In files:' entry box displays a full path, such as "C:\Programs\Python34\Lib\idlelib\*.py". If I do the same in the shell, the display is "*.py" with the  prefix, the starting directory containing pythonx.exe, suppressed. (In a repository build, the box is blank, perhaps because the executable is not in the directory containing Assuming 2, I would prefer the full path (in a wider dialog box).

1a. In a repository build, the box is blank, perhaps because the executable is not in the directory containing Lib. Starting with the patch to that directory, rather than pcbuild (on Windows) would be more useful than nothing.

2. FiF uses a generic Output Window. It first displays something like
  Searching 'Func' in lib/idlelib/idle_test/*.py ...
where the path is copied from the 'In file:' path. This common prefix is displayed with all hits
  lib/idlelib/idle_test\htest.py: 15: or a wrapper function also work...
  lib/idlelib/idle_test\htest.py: 40:     'msg': "Test editor ... 
  lib/idlelib/idle_test\mock_tk.py: 18: class Mbox_func:
If one starts from the editor window, the common prefix is even longer and more noisy and obnoxious. (It is also slightly worse in my repository setup.)
  C:\Programs\Python34\lib/idlelib/idle_test\htest.py: 15: or a wrapper function also work...
  C:\Programs\Python34\lib/idlelib/idle_test\htest.py: 40:     'msg': "Test editor ... 
  C:\Programs\Python34\lib/idlelib/idle_test\mock_tk.py: 18: class Mbox_func:
which is why I do not especially want change 1 without change 2: delete the common prefix from the listing.
  htest.py: 15: or a wrapper function also work. The name of wrapper functions, like
  htest.py: 40:     'msg': "Test editor functions of interest"
  mock_tk.py: 18: class Mbox_func:
The path prefix would have to be an attribute of the window, which should perhaps be an FiF subclass of OutputWindow anyway. The "Go to file/line" function would append the prefix.
History
Date User Action Args
2022-04-11 14:58:05adminsetgithub: 66159
2019-03-20 15:50:44terry.reedysetassignee: terry.reedy
components: + IDLE
2019-03-20 13:04:55cheryl.sabellasetstatus: open -> closed
superseder: IDLE: always display full grep path
resolution: duplicate
stage: test needed -> resolved
2014-07-11 19:19:51terry.reedysetstage: test needed
2014-07-11 19:10:32terry.reedycreate