elyxer-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[eLyXer-users] Re: Loading eLyXer as a module


From: Alex Fernandez
Subject: [eLyXer-users] Re: Loading eLyXer as a module
Date: Wed, 4 Nov 2009 22:38:08 +0100

On Wed, Nov 4, 2009 at 6:10 PM, Uwe Stöhr <address@hidden> wrote:
> They have a script that uninstall Python, delete its folder completely, and
> reinstall Python. This sounds logic because when I for example updated from
> Python 2.6.0 to 2.6.1 at home, SCons got broken. I had to uninstall the
> SCons module and reinstall it again - then it worked.

Ugh. So this solution is not nice. Let us try a different one: install
elyxer.py to your desired location, the scripts directory:
  c:\...\lyx\scripts\elyxer.py
and then add the scripts directory to the python runtime path:
  PYTHONPATH=%PYTHONPATH%;c:\...\lyx\scripts
This should add the elyxer.py file to the installed Python modules.

>> With the attached patch configure.py asks Python directly for a module
>> called elyxer. It was submitted to lyx-devel but I'm not sure if it
>> was accepted.
>
> I'll test this solution.

It would work with the solution above, I think: it would read the
elyxer Python module from the scripts directory.

>> In fact the -tt flag was not necessary; what did the trick was calling:
>>  python elyxer.py
>> instead of simply using elyxer.py as an executable file:
>>  elyxer.py
>
> But that doesn't work on Windows due to the paths with spaces. We therefore
> call all Python scripts with the -tt flag. Otherwise LyX cannot be installed
> in a path with spaces, but on WinXP the default installation path contains
> spaces.

I think the -tt option had nothing to do with that; it was just a
coincidence. In fact the Python man page says:

       -t     Issue  a  warning when a source file mixes tabs and
spaces for indentation in a way that makes it depend on
              the worth of a tab expressed in spaces.  Issue an error
when the option is given twice.

Note that it is spaces _in the source file_, not in the path. You can try
  > python elyxer.py ...
and you will see that it works as well. It was using the python executable:
  > python elyxer.py
instead of the eLyXer executable:
  > elyxer.py ...
what did the trick. As I understand it now, for some reason on your
computer all *.py files were associated with some odd version of the
Python runtime that did not parse arguments correctly. On other
computers it did work correctly.

Alex.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]