bug-lilypond
[Top][All Lists]
Advanced

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

Re: New lilypond-book error message in 7.2.39, mingw


From: Mats Bengtsson
Subject: Re: New lilypond-book error message in 7.2.39, mingw
Date: Tue, 21 Mar 2006 20:53:14 +0100
User-agent: Internet Messaging Program (IMP) H3 (4.0.4)

Quoting Han-Wen Nienhuys <address@hidden>:

Mats Bengtsson wrote:
I don't really understand why we could not include the full subprocess
module in the Python included in the lilypond package. It's included in the native Windows version of Python available at www.python.org, so it's
certainly not impossible.

The problem is that we're cross compiling Python from linux for mingw, which highly unorthodox method. Hopefully, we'll be able to work with the python community to put saner cross-compiling patches into Python.

OK! With version 2.7.40-2, the error message is now:
=======================================================
Running latex...Traceback (most recent call last):
 File "C:\Program Files\LilyPond\usr\bin\lilypond-book.py", line 1754, in ?
   main ()
 File "C:\Program Files\LilyPond\usr\bin\lilypond-book.py", line 1708, in main
   chunks = do_file (file)
File "C:\Program Files\LilyPond\usr\bin\lilypond-book.py", line 1603, in do_fi
le
   set_default_options (source)
File "C:\Program Files\LilyPond\usr\bin\lilypond-book.py", line 759, in set_de
fault_options
   textwidth = get_latex_textwidth (source)
File "C:\Program Files\LilyPond\usr\bin\lilypond-book.py", line 1416, in get_l
atex_textwidth
   ly.system ('latex %s' % tmpfile, be_verbose=global_options.verbose)
 File "out/lilylib.py", line 95, in system
 File "/usr/lib/python2.4/subprocess.py", line 542, in __init__
 File "/usr/lib/python2.4/subprocess.py", line 899, in _execute_child
AttributeError: 'module' object has no attribute 'pipe'

=======================================================


Regarding the other remaining lilypond-book + Windows related bug, the following hack is one possible solution. A cleaner solution is probably to send the arguments as a sequence to subprocess.Popen, which avoids all problems with quoting arguments. However, then the -P flag to lilypond-book won't work of you want to supply arguments there.

I don't understand; AFAIK, the cygwin bash shell should handle quoting in the same was as the unix bash shell. It's possible to use quotes with the Windows shell, but that is highly unportable; every flavor of windows uses the quotes in a different way. I'd recommend just using Cygwin.

I don't agree! My patch solves the problem at least for Windows XP which is a clear majority of the Windows users and it shouldn't break any UNIX based system. Honestly, you cannot say to a Windows
user who wants to use LilyPond that he has to install and learn
Cygwin, know that we have a nice LilyPond package that works well
in native Windows (with the exception of lilypond-book). With such an arrogant attitude towards the Windows users, you will
loose many users (and presumptious sponsors of future features).

I actually made a quick test to run lilypond-book from a Cygwin
shell and it broke with ====================================================
$ lilypond-book.py -v
Traceback (most recent call last):
File "/cygdrive/c/Program Files/LilyPond/usr/bin/lilypond-book.py", line 33, i
n ?
   import tempfile
 File "/usr/lib/python2.4/tempfile.py", line 33, in ?
   from random import Random as _Random
 File "/usr/lib/python2.4/random.py", line 69, in ?
   import _random
ImportError: No such process
====================================================
I haven't investigated what happens, since 'import tempfile'
works well both in cygwin Python and mingw Python when run from the cygwin command line.

  /Mats






reply via email to

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