Default custom editors for each platform in Bazaar Explorer 0.9.0

Ian Clatworthy ian.clatworthy at canonical.com
Sun Nov 1 05:55:48 GMT 2009


Olaf Conradi wrote:
> 2009/11/1 Olaf Conradi <olaf at conradi.org>:

>> Why not let windows figure out what to do with the file.
>> The file associations are stored in the registry.
>>
>>  -Olaf
>>
>> import win32api
>> import subprocess
>>
>> FILENAME = "c:/temp/test.csv"
>> _, exename = win32api.FindExecutable (FILENAME)
>> _, exename = win32api.FindExecutable (FILENAME)
>> subprocess.call ([exename, FILENAME])
>>
>> http://timgolden.me.uk/python/win32_how_do_i/run-a-command-with-a-space-in-it.html
>>
> 
> And the easiest action for Linux is probably running xdg-open (from
> xdg-utils package) which saves you from looking at mime-types.

Hi Olaf,

Just to clarify, the "editor" isn't the application used to "Open" the
file - the OS defaults are indeed used for that. The configured editors
are used when the user explicitly wants to "edit" the file. The
difference is particularly important for images, for example.

Ian C.



More information about the bazaar mailing list