Re: how run elyxer under Windows?

2009-03-15 Thread Alex Fernandez
>  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!

Great! I will note on the user guide that it works on Windows, and how to do it:
  http://www.nongnu.org/elyxer/userguide.html

> 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.)

Interesting. It may come handy.

Thanks for your time,

Alex.


Re: how run elyxer under Windows?

2009-03-14 Thread Murray Eisenberg

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 Massachusetts413 545-2859 (W)
710 North Pleasant Streetfax   413 545-1801
Amherst, MA 01003-9305


Re: how run elyxer under Windows?

2009-03-14 Thread Alex Fernandez
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.


Re: how run elyxer under Windows?

2009-03-14 Thread Robert Orr
For me,   I installed cygwin and ran it from a shell.

--- On Sat, 3/14/09, Murray Eisenberg  wrote:

From: Murray Eisenberg 
Subject: how run elyxer under Windows?
To: "lyx-users@lists.lyx.org" 
Date: Saturday, March 14, 2009, 3:05 PM

I've installed Python 2.5 and elyxer (along with LyX 1.6.1) under Windows XP.  
What, exactly is the command to type just to try what is described in the docs:

  cd lyx16\elyxer\docs
  ..\elyxer userguide.lyx userguide.html

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

When Python starts, I get error message:

  File "", line 1
    ../elyxer.py
    ^

(I tried using both the Windows backward slash \ and the *nix forward slash/ 
but neither works.)

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.

What's the fix (beside fixing me_?

-- 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



  

how run elyxer under Windows?

2009-03-14 Thread Murray Eisenberg
I've installed Python 2.5 and elyxer (along with LyX 1.6.1) under 
Windows XP.  What, exactly is the command to type just to try what is 
described in the docs:


  cd lyx16\elyxer\docs
  ..\elyxer userguide.lyx userguide.html

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

When Python starts, I get error message:

  File "", line 1
../elyxer.py
^

(I tried using both the Windows backward slash \ and the *nix forward 
slash/ but neither works.)


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.


What's the fix (beside fixing me_?

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