On 11/04/2013 12:34, emmanuel segura wrote:
Ciao

Grazie Per risposta, comunque ho modifcato lo script nell seguente
modo, ma non mi carica l'immagine, anche se quando lo lancio da
terminale non mi da nessuna segnalazione

==============================================================
#/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()

qui devi usare l'istanza che hai appena fatto !!!

                self.image.set_from_file("../Pictures/porta.jpg")

devi anche aggiungere l'oggetto nel contenitore!

                self.window.add(self.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()

ciao Loris

_______________________________________________
Python mailing list
Python@lists.python.it
http://lists.python.it/mailman/listinfo/python

Rispondere a