[Tutor] Working with files with python (gtk)

Edward A Robinson earobinson at gmail.com
Wed Mar 14 15:33:01 CET 2007


This is my first time posting to the python tutor so be nice, I have
read the mailing list and cant seem to find and answer there or on
google so I turn to you guys for help. I'm working on a gtk
application and I want to list all the image files in a directory. Now
I know that if I have an image lets say foo.png and I rename that to
foo.txt nautilus (the default gnome browser) still recognizes that
file as an image.

How can I do the same thing? As well as recognizes images I want users
to be able to open up each image with that images default editor. So
foo.png may open with eye of gnome but bar.jpg may open with gimp. (If
those where the settings in nautilus)

Thanks for your time, I hope this is an appropriate query for this mailing list.

-- 
Edward A Robinson


More information about the Tutor mailing list