[Tutor] tkfiledialogs and hidden files

Wayne Werner waynejwerner at gmail.com
Tue Nov 8 15:09:53 CET 2011


On Tue, Nov 8, 2011 at 6:56 AM, Jose Amoreira <ljmamoreira at gmail.com> wrote:

> **
>
> On Tuesday, November 08, 2011 12:38:19 PM Dave Angel wrote:
>
> > On 11/07/2011 09:45 PM, Jose Amoreira wrote:
>
> > > Is there any way to configure tkFileDialogs so that they don't display
>
> > > hidden files?
>
 > "Hidden files" means a different thing on various operating systems. In
>
> > Linux, it means a name with a leading period. In Windows, it can mean a
>
> > file with one or more of several attributes. There's even some
>
> > ambiguity in the latter.
>
> >
>
> > Please specify (to everyone else, not to me) what environment you're
>
> > targeting in as much detail as possible.
>
>
> Yes, I'm sorry.
>
> I meant hidden files in Linux.
>
> It's just that my home directory contains a lot of those files and
> directories and I'd rather not need to scroll the dialog display to get to
> the files/dirs that I usually want to select.
>

If you know exactly what type of files you're looking for, or that it will
be in a specific set of extensions, you can at least get rid of the files
by specifying the filetypes=[(label1, extension1), (label2, extension2),
...] argument.

Other than that, it doesn't look possible to  hide the folders.
http://mail.python.org/pipermail/python-list/2003-April/199226.html

It's not the ideal solution, but you could probably roll your own (as
recommended in the referenced post) that gives you the ability to filter
based on filename (perhaps using a regex, or at least giving you the "^"
not character).

HTH,
Wayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111108/5547e880/attachment.html>


More information about the Tutor mailing list