Browse for folder

Moshe Zadka moshez at math.huji.ac.il
Wed Jul 12 13:44:44 EDT 2000


On Wed, 12 Jul 2000, michael montagne wrote:

> I found the FileDialog sample but I need to Browse for folder not dialog.
> How might that be done?  Remeber, I'm a newbie.

If you're using Python 2.0b1 with Tcl/Tk 8.3, you should be able to do:

import tkFileDialog

class DirChooser(tkFileDialog._Dialog):

	command = "tk_chooseDirectory"

def askfordir():
	return DirChooser().show()
(untested)
--
Moshe Zadka <moshez at math.huji.ac.il>
There is no GOD but Python, and HTTP is its prophet.
http://advogato.org/person/moshez





More information about the Python-list mailing list