Reading a file in IDLE 3 on Mac-Lion

Ned Deily nad at acm.org
Sun Sep 23 03:33:16 EDT 2012


In article <505d9cc5$0$6846$e4fe514c at news2.news.xs4all.nl>,
 Hans Mulder <hansmu at xs4all.nl> wrote:
> On 22/09/12 09:30:57, Franck Ditter wrote:
> > In article <505ccdc5$0$6919$e4fe514c at news2.news.xs4all.nl>,
> >  Hans Mulder <hansmu at xs4all.nl> wrote:
> >> On 21/09/12 16:29:55, Franck Ditter wrote:
> >>> I create a text file utf-8 encoded in Python 3 with IDLE (Mac Lion).
> >>> It runs fine and creates the disk file, visible with
> >>> TextWrangler or another.
> >>> But I can't open it with IDLE (its name is greyed).
> >>> IDLE is supposed to read utf-8 files, no ?
> >>> This works on Windows-7.
> >>
> >> There's a little pop-menu below the list of files.
> >>
> >> It allows you to choose which kind of files you want to open.
> >> By default, it is set to "Python files", which greys out all
> >> files, except those with a '.py' or '.pyw' extension.
> >> Setting it to "Text files" should help, or else try "All files".
> > Alas this pop-up menu is for Windows only, I don't
> > find it on MacOS-X.
> 
> It's there on my MacOS X 10.6.5 system.
> 
> If your 10.7 system doesn't show it, that's definitely a bug.

This appears to a difference in behavior between Carbon Tk 8.4 and Cocoa 
Tk 8.5 on OS X.  The python.org 32-bit-only installers are built to link 
with the former and, with 8.4, the Open file dialog box does have the 
file-type filter menu as Hans describes.  The python.org 64-/32-bit 
installers link with the newer Cocoa Tk 8.5 and, with it, the Open file 
dialog box does not have the filter menu.  I'm not sure there is 
anything that IDLE or Tkinter can do about that; any change may need to 
be by the Tcl/Tk folks.  But it would be good if you would open an issue 
at bugs.python.org so we can follow up on it.

-- 
 Ned Deily,
 nad at acm.org




More information about the Python-list mailing list