dia = Gtk.FileChooserDialog('Please choose a file', w, Gtk.
    FileChooserAction.OPEN, (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, Gtk
    .STOCK_OPEN, Gtk.ResponseType.OK))
How to hide a Gtk+ FileChooserDialog in Python 3.4?