gnome-vfs can do this: https://help.ubuntu.com/community/Py...ipes/MIMETypes
GIO should allow the same thing, but docs for python bindings in pygobject doesn't exist for that part. Can anyone knows how to get file mimetype, and possibly meta information (prefered apps, other things)?