[Python-au] python library to discover file associations
svvampy at gmail.com
Mon Feb 21 12:23:50 UTC 2011
If calling 'os.system(txtfile)' is not sufficient, in Windows you can trek
through the registry.
First HKEY_CLASSES_ROOT\.txt which points you to the 'txtfile' entry.
the value on my system is:
I don't know what you need to do on other platforms, perhaps look at the
code for os.system?
Hmm, I just tried that via Cygwin:
>>> import os
sh: file.txt: command not found
So maybe that's not as helpful as I thought.
On 21 February 2011 17:31, Mike Dewhirst <miked at dewhirst.com.au> wrote:
> I want to launch the system text editor with a known text file but I don't
> know what that editor might be on which platform.
> Is there a Python library which can discover the system text editor on any
> python-au maillist - python-au at starship.python.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the python-au