From 60ecc39611dbb85390dce6034ec30bd0360be381 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Thu, 25 Apr 2002 14:30:20 +0000 Subject: [PATCH] Mats' fix. Try to import pre if available. --- ChangeLog | 2 ++ scripts/ly2dvi.py | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0e86f0941e..9d1af6946c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2002-04-25 Jan Nieuwenhuizen + * scripts/ly2dvi.py: Mats' fix. Try to import pre if available. + * scripts/lilypond-book.py: %Newline, rather than glue macros after \end{verbatim}. diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index bb3206df75..3c454789f8 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -66,6 +66,20 @@ import tempfile import traceback +# Handle bug in Python 1.6-2.1 +# +# there are recursion limits for some patterns in Python 1.6 til 2.1. +# fix this by importing pre instead. Fix by Mats. + +# todo: should check Python version first. +try: + import pre + re = pre + del pre +except ImportError: + import re + + ################################################################ # lilylib.py -- options and stuff # @@ -719,6 +733,7 @@ for opt in options: sys.exit (0) elif o == '--find-pfa' or o == '-f': fonts = map (lambda x: x + '.pfa', find_pfa_fonts (a)) + print `fonts` files = map (lambda x: find_file_in_path (os.environ['GS_FONTPATH'], x), fonts) -- 2.39.5