]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/book_snippets.py
Lilypond-book: Add more readable progress output, so one can see where things go...
[lilypond.git] / python / book_snippets.py
index aedee3ceefc417dcec85902b6ccc60381d5444d5..a65fe4d0b775a5e1c7f5619afaa0b9dbce07f1da 100644 (file)
@@ -739,7 +739,7 @@ printing diff against existing file." % filename)
         """Pass input through cmd, and return the result."""
 
         if self.global_options.verbose:
-            progress (_ ("Opening filter `%s'\n") % cmd)
+            progress (_ ("Running through filter `%s'\n") % cmd)
 
         # TODO: Use Popen once we resolve the problem with msvcrt in Windows:
         (stdin, stdout, stderr) = os.popen3 (cmd)
@@ -752,16 +752,16 @@ printing diff against existing file." % filename)
             status = 0
             output = stdout.read ()
             status = stdout.close ()
-            error = stderr.read ()
+            err = stderr.read ()
 
         if not status:
             status = 0
         signal = 0x0f & status
-        if status or (not output and error):
+        if status or (not output and err):
             exit_status = status >> 8
             ly.error (_ ("`%s' failed (%d)") % (cmd, exit_status))
             ly.error (_ ("The error log is as follows:"))
-            ly.stderr_write (error)
+            ly.stderr_write (err)
             ly.stderr_write (stderr.read ())
             exit (status)
 
@@ -880,6 +880,7 @@ class MusicXMLFileSnippet (LilypondFileSnippet):
             option_list.append ('--compressed')
             self.compressed = True
         opts = " ".join (option_list)
+        progress (_ ("Converting MusicXML file `%s'...\n") % self.filename)
 
         ly_code = self.filter_pipe (self.contents, 'musicxml2ly %s --out=- - ' % opts)
         return ly_code