On Fri, Jun 13, 2003 at 02:06:51PM -0700, Mark C. Mason wrote:
> This program:
> 
> #!/bin/env python
> import gtk
> 
> def hello_cb(button):
>         print "Hello World"
>         window.destroy()
> 
> window = gtk.Window(gtk.WINDOW_TOPLEVEL) # create a top level window
> # never gets past here.
> 
> Produces this message:
> 
>     window = gtk.Window(gtk.WINDOW_TOPLEVEL) # create a top level window
> AttributeError: 'module' object has no attribute 'Window'
> 
> 
> I've searched the pygtk archives, reinstalled pygtk and libgtk to no
> avail.  Help!  I'm out of time and out of ideas.

Are you using pygtk-0 or pygtk-1.99/2? In pygtk-0 the name of the
widgets is prefixed with Gtk, so it would be gtk.GtkWindow().

You can use dir(gtk) to see what symbols are defined in it, btw.

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to