Ciao a tutti Sto provando a caricare un'immagine usando gtk, ma non riesco perche ricevo un'errore di questo genere ================================================================== python mywindow.py mywindow.py:25: GtkWarning: gtk_widget_set_parent: assertion `widget != parent' failed fixe.put(fixe,100,90) mywindow.py:26: GtkWarning: gtk_widget_set_parent: assertion `widget != parent' failed fixe.add(fixe) ==================================================================
Volevo sapere se sono io che svaglio o c'e qualche problema nella versione di python che sto usando, il mio codice รจ questo =========================================================================================== #/usr/bin/env python try: import gtk import pygtk pygtk.require('2.0') except: import sys print "Error importing gtk or pygtk" sys.exit(1) class Base: def __init__(self): self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window.set_title("my example window") self.window.set_size_request(500,500) self.window.set_position(gtk.WIN_POS_CENTER) self.window.set_icon_from_file("apache.png"); self.window.connect("destroy",gtk.main_quit) self.image = gtk.Image() self.image = gtk.gdk.pixbuf_new_from_file("../Pictures/porta.jpg") fixe = gtk.Fixed() fixe.put(fixe,100,90) fixe.add(fixe) self.window.show_all() def main(self): gtk.main() if __name__ == "__main__": base = Base() base.main() ================================================================================= Grazie -- esta es mi vida e me la vivo hasta que dios quiera
_______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python