Reviewers: ,
Message:
Final patch ready to push.
http://code.google.com/p/lilypond/issues/detail?id=2107
Description:
lilylib.py : Wrap arguments with double quotes and clarify a comment.
I misunderstood what this function does before. On Windows we can skip
the escaping of \, $, ", and ` but we still need surrounding quotes.
Please review this at http://codereview.appspot.com/5483073/
Affected files:
M python/lilylib.py
Index: python/lilylib.py
diff --git a/python/lilylib.py b/python/lilylib.py
index
7a36a8aaace6ab8cce1b09d8044dc61ced22b38a..a7adc59ec538c8e3b5783cc2dff5fcdb713de8c0
100644
--- a/python/lilylib.py
+++ b/python/lilylib.py
@@ -147,11 +147,12 @@ please read 'Setup for MacOS X' in Application
Usage.")
os.system ("open http://python.org/download/")
sys.exit (2)
-# Modified version of the commands.mkarg(x), which always uses
-# double quotes (since Windows can't handle the single quotes:
+# A modified version of the commands.mkarg(x) that always uses
+# double quotes (since Windows can't handle the single quotes)
+# and escapes the characters \, $, ", and ` for unix shells.
def mkarg(x):
if os.name == 'nt':
- return x
+ return ' "%s"' % x
s = ' "'
for c in x:
if c in '\\$"`':
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel