On Fri, Apr 05, 2013 at 09:44:49PM -0700, Pavel Sanda wrote: > Enrico, > > what is the status of the python 2 detection you committed some time ago? > Is it just supposed to be fallback in order to avoid worst things or > is lyx supposed to work on systems with both 2.6 & 3.x pythons?
It is supposed to automatically use any python version 2. If I remember correctly, it should work like this: 1) At startup, all commands in $PATH whose name starts with "python" are checked and the first of them that declares to be version 2.x is taken to be a "good" python version. 2) Every time Systemcall::startscript() is called with a command starting exactly as "python -tt", the "python" string is replaced with the name of the "good" python, e.g., "python -tt" -> "python2.6.8 -tt". This means that if you call python using an absolute path or with a name like "python3.0", no substitution takes place and that version of python (whatever it is) is used instead. > Is see errors like > > Found Python 2.6.8 > > File "/lyx/devel/lib/scripts/lyxpreview2bitmap.py", line 293 > except getopt.GetoptError, err: > ^ > SyntaxError: invalid syntax > > when default python links to 3.x. This means that either you do not invoke python exactly as "python -tt" or there is a flaw in the automatic substitution code. -- Enrico