[New-bugs-announce] [issue21960] Better path handling in Idle find in files

Terry J. Reedy report at bugs.python.org
Fri Jul 11 21:10:32 CEST 2014


New submission from Terry J. Reedy:

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.

----------
messages: 222779
nosy: terry.reedy
priority: normal
severity: normal
status: open
title: Better path handling in Idle find in files
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21960>
_______________________________________


More information about the New-bugs-announce mailing list