[pygtk] Loading of images
steve george
steve_geo at optusnet.com.au
Tue Jan 29 21:24:49 WST 2008
I'd be suspecting something to do with escaped characters in your string.
try something like
button_image.set_from_file(u"icons/dvd.png")
button_image.set_from_file(u"icons/video.png")
have a look at
http://docs.python.org/ref/strings.html
vladovi at atlas.cz wrote:
>
> Hello,
>
> I'm a having a very strange problem loading images for buttons. I use
> this code:
>
> button_image = gtk.Image()
> button_image.set_from_file(u"icons\dvd.png")
>
> This works fine. But if I change the name of an image file, it
> sometimes doesn't work. For example loading of file called "video.png"
> fails. The image is not displayed. The problem is really in the
> filename. If I use 2 identical files with different names, one will
> load, the other won't.
>
> Does anybody has an idea what can cause this strange behaviour? It
> hapens on all computers I tried. But I haven't tested it in Linux
> yet, only in Windows.
>
> Thank you.
>
> Best regards,
>
> Vlada
>
>
>
>
> ---------------------------------------
> http://search.atlas.cz/
> <http://stats.atlas.cz/r.ashx?smid=15890&typeid=402&companyid=6239&areaid=16940&runid=198257&campaignid=66345&bannerid=167842&url=http%3A%2F%2Fsearch%2Eatlas%2Ecz%2F>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> pygtk mailing list pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>
--
NO to the Microsoft Office format as an ISO standard
http://www.noooxml.org/petition
More information about the pygtk
mailing list