]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.1.3
authorfred <fred>
Tue, 26 Mar 2002 21:28:58 +0000 (21:28 +0000)
committerfred <fred>
Tue, 26 Mar 2002 21:28:58 +0000 (21:28 +0000)
scripts/ly2dvi.py

index bdf89706bf04de3384df952b0bd50a99236dee52..02b6f9a5e5c1ecd3af3ff962e8e84f2df293225c 100644 (file)
@@ -876,8 +876,7 @@ class Properties:
 def getLilyopts():
     inc = ''   
     if len(Props.get('include')) > 0: 
-#        inc = '-I ' + string.join(Props.get('include'),os.pathsep)
-        inc = '-I ' + string.join(Props.get('include'), ' -I ')
+        inc = string.join (map (lambda x: '-I "%s"' % x, Props.get('include')))
     else:
 
         if Props.get('dependencies'):
@@ -1018,13 +1017,24 @@ def main():
             infile.close()
             if type == 'source':
                 cmd = 'lilypond %s %s 2>&1' % (getLilyopts(), file)
-                fd = os.popen( cmd , 'r' )
+               sys.stderr.write ('executing: %s\n'% cmd)
+               
+                fd = os.popen(cmd , 'r')
                 log = ''
-                line=fd.readline()
-                while line:
-                    log = log + line
-                    sys.stderr.write( line )
-                    line=fd.readline()
+               
+               s = fd.readline()
+               while len(s) > 0:
+                       sys.stderr.write (s)
+                       sys.stderr.flush ()
+                       log = log + s
+                       s = fd.readline ()
+               if 0:
+                       s = fd.read (1)
+                       while len(s) > 0:
+                               sys.stderr.write (s)
+                               sys.stderr.flush ()
+                               s = fd.read (1)                 
+                       log = log + s
                 stat = fd.close()
                 if stat:
                     sys.exit('ExitBadLily', cmd )