New submission from Terry J. Reedy <[email protected]>:
In the open and save-as dialog boxes, the choices for the 'Files of type' field
are governed by the filetypes list in Lib\idlelib\IOBinding.py, about line 225
(found by a friend).
filetypes = [
("Python and text files", "*.py *.pyw *.txt", "TEXT"),
("All text files", "*", "TEXT"),
("All files", "*"),
]
I see multiple problems with this:
1. The first line, which for me is the default, mixes Python and text files,
while one nearly only wants to only search through Python files. I propose to
remove 'and text' and '*.txt'.
2. The second line, which would currently be redundant with the first if it did
what it said (but would not be with the first fix), has a bug in the file spec,
'*' instead of '*.txt', that makes it redundant with the third line. I propose
to fix that bug.
The following is copied from my patched and tested version of the file:
filetypes = [
("Python files", "*.py *.pyw", "TEXT"),
("Text files", "*.txt", "TEXT"),
("All files", "*"),
]
So this is a trivial 2 line patch.
----------
components: IDLE
keywords: easy
messages: 109951
nosy: tjreedy
priority: normal
severity: normal
status: open
title: IDLE: Fix open/saveas 'Files of type' choices
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue9222>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com