[pygtk] file chooser: select files and folders
Andrew Z
ahz001 at gmail.com
Sat Nov 27 12:41:18 WST 2010
How can the the file chooser allow the user to select any files and
folders at the same time? gtk.FileChooser.set_action() indicates
files and folders are mutually exclusive
http://www.pygtk.org/docs/pygtk/class-gtkfilechooser.html#method-gtkfilechooser--set-action
This code only allows the user to select folders
#!/usr/bin/env python
import pygtk
import gtk
dialog = gtk.FileChooserDialog("Open file or folder",
None,
gtk.FILE_CHOOSER_ACTION_OPEN | gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER)
response = dialog.run()
dialog.destroy()
More information about the pygtk
mailing list