]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/lilypond-book.py
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / scripts / lilypond-book.py
index a9eaeaf149abd6bc4f2f8e15d79004f4388e6ff1..486d21fedb92d2122b40b68f60aa43d1f809fbbc 100644 (file)
@@ -58,9 +58,10 @@ sys.path.insert (0, os.path.join (datadir, 'python'))
 if os.environ.has_key ('LILYPONDPREFIX'):
     datadir = os.environ['LILYPONDPREFIX']
     while datadir[-1] == os.sep:
-        datadir= datadir[:-1]
-        
-    datadir = os.path.join (datadir, "share/lilypond/current/")
+        datadir = datadir[:-1]
+
+    if not os.path.exists (os.path.join (datadir, 'python/lilylib.py')):
+        datadir = os.path.join (datadir, 'share/lilypond/current/')
 sys.path.insert (0, os.path.join (datadir, 'python'))
 
 # dynamic relocation, for GUB binaries.
@@ -1264,7 +1265,7 @@ def find_toplevel_snippets (s, types):
 
     snippets = []
     index = 0
-    found = dict ((t, None) for t in types))
+    found = dict ((t, None) for t in types)
 
     line_starts = find_linestarts (s)
     line_start_idx = 0