[Checkins] SVN: z3c.rml/trunk/src/z3c/rml/rml2pdfscript.py The subprocess rendering is broken on windows since the

Roger Ineichen roger at projekt01.ch
Fri Jan 25 23:03:20 EST 2008


Log message for revision 83234:
  The subprocess rendering is broken on windows since the 
  explicit python is gone in program command. Move it back for windows.

Changed:
  U   z3c.rml/trunk/src/z3c/rml/rml2pdfscript.py

-=-
Modified: z3c.rml/trunk/src/z3c/rml/rml2pdfscript.py
===================================================================
--- z3c.rml/trunk/src/z3c/rml/rml2pdfscript.py	2008-01-26 04:00:33 UTC (rev 83233)
+++ z3c.rml/trunk/src/z3c/rml/rml2pdfscript.py	2008-01-26 04:03:20 UTC (rev 83234)
@@ -22,6 +22,9 @@
 
 _fileOpen = None
 
+WIN = False
+if sys.platform[:3].lower() == "win":
+    WIN = True
 
 def excecuteSubProcess(xmlInputName, outputFileName, testing=None):
     # set the sys path given from the parent process
@@ -86,7 +89,13 @@
     py = sys.executable
 
     # setup the cmd
-    program = [__file__, 'excecuteSubProcess', xmlInputName, outputFileName]
+    if WIN:
+        # we need an explicit python in our command
+        program = [py, __file__, 'excecuteSubProcess', xmlInputName,
+                   outputFileName]
+    else:
+        # seems that this is not the case on linux
+        program = [__file__, 'excecuteSubProcess', xmlInputName, outputFileName]
     if testing is True:
         program.append('testing=1')
     program = " ".join(program)



More information about the Checkins mailing list