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