moephan
February 6th, 2006, 01:01 AM
Hello,
I am using some images in a dialog box to show different states. I have the images in a sub-directory and can refer to them in my python scripts like:
myimag.set_from_file("images/imagename.png")
This works fine when I run the script from within the directory, but when I create a link to the script and try to run it from somewhere else, like the panel, it can't find the images. I have fixed the problem by putting the images in /usr/share/pixmaps/. Is that the right fix, or is there someway to specify the path as relative to the script no matter where the script is being called from? Thanks.
Cheers, Rick
I am using some images in a dialog box to show different states. I have the images in a sub-directory and can refer to them in my python scripts like:
myimag.set_from_file("images/imagename.png")
This works fine when I run the script from within the directory, but when I create a link to the script and try to run it from somewhere else, like the panel, it can't find the images. I have fixed the problem by putting the images in /usr/share/pixmaps/. Is that the right fix, or is there someway to specify the path as relative to the script no matter where the script is being called from? Thanks.
Cheers, Rick