Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

i want to get the location of the folder that is selected by a filechooserbutton in pygtk... how can i do this?

i connect the current folder changed signal from filechooser but the signal is emitted twice so i get the name of the folder twice...

i don't know what signal to connect... can i do something with properties? any idea will be usefull... :)

share|improve this question
up vote 2 down vote accepted

A gtk.FileChooserButton implements the gtk.FileChooser interface. This means you can just use those methods on your button. get_current_folder() is probably the one you need.

share|improve this answer
which signal is better to connect? for using the gtk.FileChooser i must one, but i have only the gtk.FileChooserButton ... i must create a gtk.FileChooser in glade and then use the builder.get_object() ? – Clepto Jul 7 '12 at 21:43
You don't need to create a gtk.FileChooser, the gtk.FilechooserButton implements its interface, which means you can use those methods, signals and properties. Do you really need signals? Usually you just retrieve the selected folder with the above mentioned get_current_folder() method. – Timo Jul 7 '12 at 22:33
you are right! thanks! – Clepto Jul 8 '12 at 7:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.