Jean-Marc Lasgouttes wrote:
> Concerning Bo's remark that a lot of win32/mac specific code is
> going to be added, we should think a bit about that before actually
> doing it.
> 
> One solution would be to add code at LyX level to use OS-provided
> hooks for opening documents. Then we could decide that these
> OS-provided hooks override what LyX wants to do.
> 
> The other solution is to do it in the python script. However, I do
> not know what abilities python has to discover these things. I do
> not like much the code that searches the registry in windows.

I think that we should have all this stuff outside of LyX itself. All
LyX needs is to be able to find an executable and to know how to
invoke it. LyXRC::path_prefix and the converters provide us with
everything we need, no?

I agree that the registry stuff is ugly. Individual apps store stuf in
the registry in different ways, so there wouldn't appear to be a
generic way to extract these data.

As for python's abilities in this regard, googling on "python search
registry" turns up lots of stuff. Eg

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/174627
http://www.oreillynet.com/pub/wlg/2608
http://www.microsoft.com/technet/scriptcenter/scripts/python/os/registry/default.mspx

-- 
Angus

Reply via email to