if '@bindir@' == ('@' + 'bindir@') or not os.path.exists (lilypond_binary):
lilypond_binary = 'lilypond'
+# Need to shell-quote, issue 3468
+
+import pipes
+lilypond_binary = pipes.quote (lilypond_binary)
+
global_options = None
Return value is a set of strings.
"""
files = []
- for subdir in glob.glob (os.path.join (directory, '[a-f0-9][a-f0-9]')):
+ def globquote(x):
+ return re.sub ("[][*?]", r"[\g<0>]", x)
+ for subdir in glob.glob (os.path.join (globquote (directory),
+ '[a-f0-9][a-f0-9]')):
base_subdir = os.path.split (subdir)[1]
sub_files = [os.path.join (base_subdir, name)
for name in os.listdir (subdir)]
in_handle = file (input_fullname)
if input_filename == '-':
+ global_options.input_dir = os.getcwd ()
input_base = 'stdin'
elif included:
input_base = os.path.splitext (input_filename)[0]
else:
+ global_options.input_dir = os.path.split (input_absname)[0]
input_base = os.path.basename (
os.path.splitext (input_filename)[0])
nr = 0
for i in global_options.custom_packages:
nr += 1
- print imp.load_source ("book_custom_package%s" % nr, i)
+ progress (str(imp.load_source ("book_custom_package%s" % nr, i)))
if global_options.warranty: