]> git.donarmstrong.com Git - lilypond.git/blobdiff - scripts/ly2dvi.py
patch::: 1.1.53.jbr1
[lilypond.git] / scripts / ly2dvi.py
index deb297b5992ae654b33950ab5d549e74ec093872..25da9f8fce53a942c5982d455ceb079546208335 100644 (file)
@@ -14,7 +14,7 @@ Output: DVI file
 """
 
 name = 'ly2dvi'
-version = '0.0.11'
+version = '0.0.12'
 errorlog = ''
 
 import sys
@@ -854,7 +854,11 @@ class Properties:
         """
 
         os.environ['LILYPONDPREFIX'] = path
+        if os.name == 'nt' or os.name == 'dos':
+            path = unc2dos(path);
+
        this.__set('root',path,requester)
+        
 
     #
     # printProps
@@ -912,6 +916,17 @@ def getTeXFile(contents):
     else:
         return texfiles
 
+def unc2dos(path):
+    """
+    Convert a path of format //<drive>/this/that/the/other to
+    <drive>:\this\that\the\other
+    """
+    m=re.match('^//([A-Za-z])(/.*)$',path)
+    if m:
+        return m.group(1) + ':' + os.path.normpath(m.group(2))
+    
+    
+
 def program_id ():
     return name + ' ' + version;