[issue18903] IDLE file-completion is case-sensitive in Windows

2020-06-07 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions: +Python 3.10 -Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18903] IDLE file-completion is case-sensitive in Windows

2017-06-29 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
assignee:  -> terry.reedy
versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18903] IDLE file-completion is case-sensitive in Windows

2017-06-29 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18903] IDLE file-completion is case-sensitive in Windows

2014-10-04 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Wesley himself suggested that it is not ready to apply.  There are currently 7 
completion issues for Idle.  I hope to someday work on all of them together, 
alone with a test file. But there are a couple of other issue clusters that I 
consider higher priority.

--
stage: needs patch - patch review
versions: +Python 2.7

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18903
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18903] IDLE file-completion is case-sensitive in Windows

2014-10-03 Thread Mark Lawrence

Mark Lawrence added the comment:

@Terry can you comment on Westley's patch please.

--
nosy: +BreamoreBoy
versions: +Python 3.5 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18903
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18903] IDLE file-completion is case-sensitive in Windows

2013-09-10 Thread Westley Martínez

Westley Martínez added the comment:

I've written a patch that sort of implements the functionality that makes the 
most sense to me.  The problem is it only works right for the first entry.  
It's kind of wonky and I'm not entirely sure how it behaves, nor do I know the 
cause of the bug, but it's a start.

--
keywords: +patch
Added file: http://bugs.python.org/file31710/cpython-idle-18903-1.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18903
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18903] IDLE file-completion is case-sensitive in Windows

2013-09-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

A possible complication is that at least in part, the same code 
(AutoComplete.py) is used for both attribute completion and filename 
completion. Attribute completion is always case sensitive.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18903
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18903] IDLE file-completion is case-sensitive in Windows

2013-09-08 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The initial difficulty I am having is that the edit menu, help file, code, and 
behavior do not seem to match up, so this whole feature set needs more review. 
For one thing, the AutoCompleteWindow (ACW) often comes up empty initially. 
Sometimes it fills in a couple of seconds later, sometimes not. Or it only 
fills in if I enter or delete a char.

However, I did manage to reproduce the issue. (Westley, your ambiguous report 
cannot be exactly correct. If you typed 3 chars (no quotes) and tab, you should 
get a list of python names, not filenames. If you typed 5 chars (two quotes) 
and tab, you should get a literal tab. You would have to type 4 chars (open 
quote only) and tab to get filenames.)

Reviewing the code, I see the following.
AutoComplete.open_completions calls .fetch_completions to get a sorted list of 
possible completions, according to the mode. It then makes an ACW and calls 
.show_window.  ACW.show_window receives the mode and stores it as self.mode. 
That is used in the logic of ACW.keypress_event for handling 'special' 
characters. It is currently not used for matching normal characters to 
completions. ACW.show_window also allocates a tk.Listbox with
self.listbox = listbox = Listbox(acw, yscrollcommand=scrollbar.set,
   exportselection=False, bg=white)
As near as I can tell, the matching of what the user types with entries in the 
ACW listbox is done in ACS._binary_search as items in the listbox seem to be 
set with
self.listbox.select_set(self._binary_search(self.start))

For this issue, we need two things.

1. .fetch_completions should sort filenames disregarding case on Windows.  
Perhaps key = str.lower will be sufficient, but I do not know what 
'case-insensitive' actually means on Windows with respect to general Unicode 
file names. 

2. A case-insensitive version of _binary_search -- perhaps an instance function 
(closure) defined in .show_window using a list of lower-cased entries. Both the 
original and replacement should probably use the bisect module, which has a C 
accelerator.

There is a third thing: tests. I am reluctant to continue patching Idle without 
tests for the issue, but writing one for this will probably be harder than the 
patch itself. My main concern is not to make things worse.

It would to easier to document that one should start with one letter and if 
there is no desired match, backspace and try the other case ;-).

--
stage:  - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18903
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18903] IDLE file-completion is case-sensitive in Windows

2013-09-08 Thread Westley Martínez

Westley Martínez added the comment:

My example was totally abstract and untested.  Sorry for any confusion.

After doing some research, I find that this issue is complicated further:
http://support.microsoft.com/kb/100625

I think we can assume that running into a situation where there are identical 
filenames except for case is quite rare.  The thing is, I don't even know how 
to make files like this on Windows.  Explorer doesn't work, and other Win32 
apps won't do it (they all spit up errors).  I reckon I can do it with Python 
or some other language, since I assume they does these things at a low level.

I'll start looking at the code and see if I can come up with a patch.  My aim 
is to make it similar enough to how the Windows Terminal does it, (i.e. it 
corrects the typed name to the proper case) since that is what I'd imagine most 
Windows programmers are used to.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18903
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18903] IDLE file-completion is case-sensitive in Windows

2013-09-07 Thread Westley Martínez

Westley Martínez added the comment:

I believe HFS is case-preserving as well, but it also can be configured to be 
case-sensitive.  I'm not a Mac owner though so don't take my word for it.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18903
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18903] IDLE file-completion is case-sensitive in Windows

2013-09-06 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This strikes me a sort-of a bug.  However, feature vs. bug does not matter for 
small changes (see PEP434).  Is Windows the only case preserving, case 
insensitive OS?

--
nosy: +terry.reedy

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18903
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18903] IDLE file-completion is case-sensitive in Windows

2013-09-01 Thread Westley Martínez

New submission from Westley Martínez:

Hi, I'm not sure if this would be considered a bug or a feature request, but 
IDLE's file-completion is case-sensitive in Windows (e.g. if I have a file 
named ABBA and I type in 'abb' + tab, ABBA won't pop up.  Since Windows files 
systems are not case-sensitive, it might make sense for the file-completion to 
disregard case as well.  I'm not sure if this behaviour is preferred, however, 
so I'll leave that up for discussion.

I tested the behaviour on 3.3 and 3.4; I assume it's the same for other 
versions as well.

--
components: IDLE, Windows
messages: 196765
nosy: anikom15
priority: normal
severity: normal
status: open
title: IDLE file-completion is case-sensitive in Windows
type: enhancement
versions: Python 3.3, Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18903
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com