Hi,
Am Montag, den 08.11.2010, 02:11 -0800 schrieb grasbauer:
> (nothing approved - only a public brainstorming ;)
>
> if you have an extension and you are on windows:
>
> os.startfile opens the right application
>
> if you dont have an extension and you are on windows, something like
>
> subprocess.Popen("/usr/bin/file -i path", shell=True, \
> stdout=subprocess.PIPE).communicate()[0]
maybe better?
http://stackoverflow.com/questions/43580/how-to-find-the-mime-type-of-a-file-in-python/2753385#2753385
Cheers
--
Udo Spallek
------------------------------------
virtual things
Preisler & Spallek GbR
Munich - Aix-la-Chapelle
Windeckstr. 77
81375 Munich - Germany
Tel: +49 (89) 710 481 55
Fax: +49 (89) 710 481 56
[email protected]
http://www.virtual-things.biz
--
[email protected] mailing list