[pygtk] Working with files with python (gtk)
Edward A Robinson
earobinson at gmail.com
Fri Mar 16 04:28:00 WST 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?
I guess what Im looking for is a python command that dose what the
file command in the shell would do, as well as figure out the correct
program to open the file with.
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)
Also how would I get cut and paste to work so that I can cut a file
from my image browser then paste it into nautilus. I know how to get
it to work for basic text but not for files.
Thanks for your time, I hope this is an appropriate query for this mailing list.
--
Edward A Robinson
More information about the pygtk
mailing list