Issue 21960: Better path handling in Idle find in files (original) (raw)
I propose two interrelated changes for path handling in Idle's Find in Files feature (Alt-F3).
- 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.
- 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.