I did not try it out but my first guess is: the image is not found in Windows due to the different path syntax.
In linux you will have a path like /home/user/picture.jpg but in windows 1.) there is no /, instead \ is used 2.) absolute paths start at the drive letter like C:\Users\picure.jpg I believe python's "os" module will help you build the correct paths depending on which system the code is running. Gorse Emmanuel wrote: > Hye, > > I'm using this code to display an image on a button: > > img = gtk.Image() > img.set_from_file(imgFullFile) > button.set_image(img) > > with imgFullFile beeing the absolute path of the image. > > The code works fine under Linux, but the image is not displayed under Windows. > Do you have any idea why ? > > Regards, > _______________________________________________ > pygtk mailing list [email protected] > http://www.daa.com.au/mailman/listinfo/pygtk > Read the PyGTK FAQ: http://faq.pygtk.org/ > _______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/
