Default custom editors for each platform in Bazaar Explorer 0.9.0

Olaf Conradi olaf at conradi.org
Sun Nov 1 05:45:21 GMT 2009


2009/11/1 Olaf Conradi <olaf at conradi.org>:
> Hi,
>
> 2009/11/1 Ian Clatworthy <ian.clatworthy at canonical.com>:
>> I'd like some input/patches to get the out-of-the-box editors "right"
>> for each desktop environment. Please take a look at
>> http://bazaar.launchpad.net/~bzr-explorer-dev/bzr-explorer/trunk/annotate/head%3A/lib/std_profile/editors.conf
>> and send me patches/suggestions for improvements.
>
> 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.

Cheers,
 -Olaf



More information about the bazaar mailing list