lilypond-user
[Top][All Lists]
Advanced

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

Re: Lilypond-book not working after installing Python 3


From: Reinhold Kainhofer
Subject: Re: Lilypond-book not working after installing Python 3
Date: Fri, 26 Feb 2010 20:39:05 +0100
User-agent: KMail/1.13.0 (Linux/2.6.31-19-generic; KDE/4.4.0; i686; ; )

Am Freitag, 26. Februar 2010 20:16:11 schrieb Han-Wen Nienhuys:
> IIRC I saw a bunch of changes by Jan some time ago to make our scripts
> support both Python 2.x and 3.x  - some of them may have inadvertently
> be reverted.
> 
> I think it is possible to support both with some work, and some loss
> of neatness in the code.

There are some incompatible changes (one I ran into some days ago), like e.g. 
named exceptions. In python 2.4 you need to use

except InvalidVersionException, ex:

while in in 2.5 (or 2.6) (which still supports the above comma syntax) you can 
and in 3.0 (which does not the comma syntax any more) you MUST write

except InvalidVersionException as ex:

Cheers,
Reinhold
-- 
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org




reply via email to

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