]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/lilylib.py
* tex/lilyponddefs.tex (\lilypondECencoding): New command to handle
[lilypond.git] / python / lilylib.py
index 5652f6faffa08520a486dd84ab6c37b1581e461a..0f48d4dac05465d0e1bc156d0fa938a0106ab7a5 100644 (file)
@@ -30,7 +30,9 @@ import glob
 # If set, LILYPONDPREFIX must take prevalence
 # if datadir is not set, we're doing a build and LILYPONDPREFIX
 
-import getopt, os, sys
+import getopt
+import os
+import sys
 datadir = '@local_lilypond_datadir@'
 if not os.path.isdir (datadir):
        datadir = '@lilypond_datadir@'
@@ -235,9 +237,9 @@ def setup_temp ():
 
 def command_name (cmd):
 
-       # deal with "((latex ) >& 1 ) .." too 
+       # deal with "((latex ) >& 1 ) .." too
        cmd = re.match ("([\(\)]*)([^ ]*)", cmd).group(2)
-       return os.path.split (cmd)[1]
+       return os.path.basename (cmd)
 
 def error_log (name):
        name = re.sub('[^a-z]','x', name)
@@ -520,3 +522,5 @@ def make_ps_images (ps_name, resolution = 90):
        cmd = r'''gs -s  -sDEVICE=pnggray  -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=%s -dNOPAUSE -r%d %s -c quit''' % (output_file,
                                                                                                                                      resolution, ps_name)
 
+       return output_file
+