NameError

GMTaglia liquid at kuht.it
Tue Oct 5 22:17:55 CEST 2004


Hi guys,

probably dumb question but after googling a lot I couldn't find an answer.
with a simple Gtk:Dialog I have this error:

Traceback (most recent call last):
  File "elenco.py", line 122, in show_msg
    dialog.vbox.pack_start(label, TRUE, TRUE, 0)
NameError: global name 'TRUE' is not defined

This surprising me a lot, I don't understand what is wrong,

Here is the code:

   def show_msg(self, widget):
        dialog = gtk.Dialog("Info Box", None, 0, (gtk.STOCK_CLOSE,
gtk.RESPONSE_CLOSE))
        label = gtk.Label("Dialogs are groovy")
        dialog.vbox.pack_start(label, TRUE, TRUE, 0)
        label.show()

very simple (hope the mistake is here)

I have python 2.3.4 Installed with pygtk 2.4.0 on Gentoo GNU/Linux.

Thank's to everybody in advance.
Cheers, Mario



More information about the Python-list mailing list