tkinter - tkFileDialog - how to get dir instead of file

Matthew Dixon Cowles matt at mondoinfo.com
Mon Oct 29 19:05:34 EST 2001


On Mon, 29 Oct 2001 23:14:44 +0100, maxm <maxm at mxm.dk> wrote:

Max,

>I am writing my first tkinter program and so far it's been pretty painless.

That's great, you're ahead of the game.

>But now I need to open a directory and not a file. I cannot see a
>simple way to get this from the standard module "tkFileDialog".

>Do I really have to write a special class for this?

Alas, you probably do. Tk provides a directory chooser but Python
doesn't (yet) expose it. I filed a feature request on SourceForge for
it but it doesn't look like anything has been done about it yet,
including by me.

Regards,
Matt



More information about the Python-list mailing list