Jose' Matos wrote: >> Incidentally, José, I understand that Windows users are having >> difficulty launching lyx2lyx because it doesn't have a ".py" extension >> and because Windows doesn't search the first line of the script for >> "#! /bin/env python" > > What do you suggest?
Invoke lyx2lyx as "python <system_lyxdir>/lyx2lyx/lyx2lyx". That is guaranteed to work if python is in the PATH. >> > Try changing this line in your lyxrc.defaults file (you can >> > do it from the Preferences dialog, where it will be saved in the >> > $HOME/.lyx/preferences file): >> > >> > \converter lyxpreview ppm "lyxpreview2ppm.py" "" >> > >> > to >> > >> > \converter lyxpreview ppm "python $$s/lyxpreview2ppm.py" "" >> > >> > ($$s is a placeholder that will be replaced with the path to the >> > script directory.) > > The other option would be to understand that the we are talking about a > python script and call it from inside the scripts directory. I know that > the code then becomes too clever but I don't have any easy solution for a > multi-plantform installation. I think that the "$$s" solution is workable and is enough. It'll work now on LyX 1.4.x. LyX 1.3.x assumes that "$$s" is at the start of the command, but that's easy to fix. >> Anyway, in windows, the cygwin python must be used, >> as the bundled one gives: >> >> 'import site' failed; use -v for traceback >> Traceback (most recent call last): >> File "C:/Programs/lyx/share/lyx/scripts/lyxpreview2ppm.py", line 50, >> in >> ? import glob, os, re, string, sys >> ImportError: No module named glob > > This is a symptom of a bad installation, as the python doesn't know the > location of the standard directory. Ruurd bundles a 'minimal' python distribution that doesn't contain all the modules needed by lyxpreview2ppm.py. -- Angus