

def __init__(self, parent_w, action=gtk.FILE_CHOOSER_ACTION_OPEN, title='Select a file'):
    self.parent = parent_w
    self.filew = gtk.FileChooserDialog(title=title, action=action)
    self.filew.connect('destroy', self.close)
    if (action == gtk.FILE_CHOOSER_ACTION_SAVE):
        action.filew.add_buttons(gtk.STOCK_SAVE, 1, gtk.STOCK_CANCEL, 0)
    else:
        self.filew.add_buttons(gtk.STOCK_OPEN, 1, gtk.STOCK_CANCEL, 0)
    self.filew.set_default_response(1)
    self.filew.connect('response', self.file_ok_sel)

dataset/ETHPy150Open ejeschke/ginga/ginga/gtkw/GtkHelp.py FileSelection.__init__/VarMisuse@69/99 `self`->`action`