[Patches] [ python-Patches-478654 ] Add Choose_Directory -> tkFileDialog

noreply@sourceforge.net noreply@sourceforge.net
Wed, 07 Nov 2001 14:39:36 -0800


Patches item #478654, was opened at 2001-11-06 05:23
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=478654&group_id=5470

Category: Tkinter
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Benjamin Schollnick (bscholln)
Assigned to: Nobody/Anonymous (nobody)
Summary: Add Choose_Directory -> tkFileDialog

Initial Comment:
Via TkFileDialog we already have the ability to choose 
file(s), and other objects in Tk Windows...

But we have no way to choose a directory without 
patching the code....

class Directory (_Dialog):
    command = "tk_chooseDirectory"

def choose_directory (**options):
    return apply(Directory, (), options).show()

Added into the tkFileDialog module, will allow us to 
add this functionality...

dir = tkFileDialog.choose_directory()

This is needed, to allow installers, etc, to be coded 
via python in a completely GUI manner, without add-
on's, etc.

My understanding is, depending on the Tkinter level, 
the underlying Tkinter code maybe windows dependant.  
But from the quick glance I made in c.l.tcl, it 
appears that in the latest version of Tkinter, it's 
platform neutral.



----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2001-11-07 14:39

Message:
Logged In: YES 
user_id=21627

Thanks for the patch, applied as tkFileDialog.py 1.3, NEWS
1.310.

Notice that I exported the convenience function as
"askdirectory".

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=478654&group_id=5470