fixed bug to open pdf with acrobat reader on Win32 in objdictedit and networkedit
authorgreg
Tue, 26 Feb 2008 10:26:00 +0100
changeset 408 f85552acc2bf
parent 407 384c3cd7afa2
child 409 f2920812471e
fixed bug to open pdf with acrobat reader on Win32 in objdictedit and networkedit
objdictgen/doc_index/DS301_index.py
objdictgen/networkedit.py
objdictgen/objdictedit.py
--- a/objdictgen/doc_index/DS301_index.py	Sun Feb 24 02:03:19 2008 +0100
+++ b/objdictgen/doc_index/DS301_index.py	Tue Feb 26 10:26:00 2008 +0100
@@ -32,7 +32,7 @@
                 readerpath = get_acroversion()
                 readerexepath = os.path.join(readerpath,"AcroRd32.exe")
                 if(os.path.isfile(readerexepath)):
-                    os.spawnl(os.P_DETACH, readerexepath, "AcroRd32.exe", "/A", "page=%d=OpenActions" % DS301_PDF_INDEX[index], os.path.join(cwd, "doc","301_v04000201.pdf"))
+                    os.spawnl(os.P_DETACH, readerexepath, "AcroRd32.exe", "/A", "page=%d=OpenActions" % DS301_PDF_INDEX[index], '"%s"'%os.path.join(cwd, "doc","301_v04000201.pdf"))
             else:
                 os.system("xpdf -remote DS301 %s %d &"%(os.path.join(cwd, "doc","301_v04000201.pdf"), DS301_PDF_INDEX[index]))
         else:
@@ -40,7 +40,7 @@
                 readerpath = get_acroversion()
                 readerexepath = os.path.join(readerpath,"AcroRd32.exe")
                 if(os.path.isfile(readerexepath)):
-                    os.spawnl(os.P_DETACH, readerexepath, "AcroRd32.exe", os.path.join(cwd, "doc","301_v04000201.pdf"))
+                    os.spawnl(os.P_DETACH, readerexepath, "AcroRd32.exe", '"%s"'%os.path.join(cwd, "doc","301_v04000201.pdf"))
             else:
                 os.system("xpdf -remote DS301 %s &"%os.path.join(cwd, "doc","301_v04000201.pdf"))
         return True
--- a/objdictgen/networkedit.py	Sun Feb 24 02:03:19 2008 +0100
+++ b/objdictgen/networkedit.py	Tue Feb 26 10:26:00 2008 +0100
@@ -742,7 +742,7 @@
             readerpath = get_acroversion()
             readerexepath = os.path.join(readerpath,"AcroRd32.exe")
             if(os.path.isfile(readerexepath)):
-                os.spawnl(os.P_DETACH, readerexepath, "AcroRd32.exe", os.path.join(ScriptDirectory, "doc","manual_en.pdf"))
+                os.spawnl(os.P_DETACH, readerexepath, "AcroRd32.exe", '"%s"'%os.path.join(ScriptDirectory, "doc","manual_en.pdf"))
         else:
             os.system("xpdf -remote CANFESTIVAL %s %d &"%(os.path.join(ScriptDirectory, "doc/manual_en.pdf"),16))
         event.Skip()
--- a/objdictgen/objdictedit.py	Sun Feb 24 02:03:19 2008 +0100
+++ b/objdictgen/objdictedit.py	Tue Feb 26 10:26:00 2008 +0100
@@ -395,7 +395,7 @@
             readerpath = get_acroversion()
             readerexepath = os.path.join(readerpath,"AcroRd32.exe")
             if(os.path.isfile(readerexepath)):
-                os.spawnl(os.P_DETACH, readerexepath, "AcroRd32.exe", os.path.join(ScriptDirectory, "doc","manual_en.pdf"))
+                os.spawnl(os.P_DETACH, readerexepath, "AcroRd32.exe", '"%s"'%os.path.join(ScriptDirectory, "doc","manual_en.pdf"))
         else:
             os.system("xpdf -remote CANFESTIVAL %s %d &"%(os.path.join(ScriptDirectory, "doc/manual_en.pdf"),16))
         event.Skip()