Tell me more ×  I have already added the listeners and etc, but
I can't get the actual open dialog code to work. I think it is
something to do with the difference between gtk and Gtk but I
literally just started python yesterday. Here is my code as of
now:  dialog = Gtk.FileChooserDialog("Open..",
(Gtk.STOCK_CANCEL, Gtk.RESPONSE_CANCEL,
Gtk.STOCK_OPEN, Gtk.RESPONSE_OK))  When the button is pressed,
the console output this:  Traceback (most recent call last):
File "/home/nja/notetaker/notetaker/", line 61, in
on_btn_open_clicked File "/home/nja/notetaker/notetaker/", line
41, in open_file NameError: global name
'GTK_FILE_CHOOSER_ACTION_OPEN' is not defined  Also when
GTK_FILE_CHOOSER_ACTION_OPEN is substituted for "0" (Which I
believe is the int that constant points to) it works fine but it
flags up the same error on Gtk.RESPONSE_CANCEL and
Gtk.RESPONSE_OK  share|improve this question add comment  1
Answer  up vote 2 down vote accepted  You must replace: