[Tutor] Working with files with python (gtk)

Edward A Robinson earobinson at gmail.com
Thu Mar 15 03:53:50 CET 2007

I guess what Im looking for is a python command that dose what the
file command in the shell would do

On 3/14/07, Edward A Robinson <earobinson at gmail.com> wrote:
> 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

Edward A Robinson

More information about the Tutor mailing list