Yes,

  python ..\elyxer.py userguide.lyx userguide2.html

did work. (And the resulting html file was identical to the version userguide.html supplied with the elyxer distribution.) Thank you!

And it also works if you leave the distributed file as just elyxer, without appending the .py suffix!

The key thing is that, in the Windows environment, the OS knows nothing about python scripts, hence one must explicitly begin the call to elyxer with "python".

I do note that this does NOT work with the current version of Python, namely, 3.0.1: Python gives an "invalid syntax" error for "print message" in line 64 of the elyxer script.

Finally, I see that the installed LyX 1.6.1 for Windows includes a python subdirectory that includes a Python executable, python.exe, and a python26.dll module along with a python lib directory. Calling that Python 2.6 executable seems to work as well as the separate Python 2.5 that I installed elsewhere. (I hadn't realized until now that Python was included with LyX.)


Alex Fernandez wrote:
Hi Murray,

Of course that won't work in Windows, since Windows doesn't know that elyxer
is a python script.  So I did two things:  First, I changed the name from
"elyxer" to "elyxer.py".  And second, I tried this command:

 python -c ../elyxer.py userguide.lyx userguide.html

I'm by no means an expert, but according to:
  http://docs.python.org/dev/using/cmdline.html#using-on-cmdline
you just have to drop the -c. So it seems it should be:
$ python ..\elyxer.py userguide.lyx userguide.html

(I don't have a Windows installation to try it on, sorry.)

Once again, I'm stymied by something allegedly ported from *nix to Windows
and either not working as it should or else not documented correctly.

I am sorry if I gave that impression; in fact it has not been tested
on Windows. If you don't mind you can be the test subject for running
eLyXer on Windows.

What's the fix (beside fixing me_?

First try that command. Then we can try the next step.

Alex.


--
Murray Eisenberg                     mur...@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

Reply via email to