30 if index in DS301_PDF_INDEX: |
30 if index in DS301_PDF_INDEX: |
31 if wx.Platform == '__WXMSW__': |
31 if wx.Platform == '__WXMSW__': |
32 readerpath = get_acroversion() |
32 readerpath = get_acroversion() |
33 readerexepath = os.path.join(readerpath,"AcroRd32.exe") |
33 readerexepath = os.path.join(readerpath,"AcroRd32.exe") |
34 if(os.path.isfile(readerexepath)): |
34 if(os.path.isfile(readerexepath)): |
35 os.spawnl(os.P_DETACH, readerexepath, "AcroRd32.exe", "/A", "page=%d=OpenActions" % DS301_PDF_INDEX[index], os.path.join(cwd, "doc","301_v04000201.pdf")) |
35 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")) |
36 else: |
36 else: |
37 os.system("xpdf -remote DS301 %s %d &"%(os.path.join(cwd, "doc","301_v04000201.pdf"), DS301_PDF_INDEX[index])) |
37 os.system("xpdf -remote DS301 %s %d &"%(os.path.join(cwd, "doc","301_v04000201.pdf"), DS301_PDF_INDEX[index])) |
38 else: |
38 else: |
39 if wx.Platform == '__WXMSW__': |
39 if wx.Platform == '__WXMSW__': |
40 readerpath = get_acroversion() |
40 readerpath = get_acroversion() |
41 readerexepath = os.path.join(readerpath,"AcroRd32.exe") |
41 readerexepath = os.path.join(readerpath,"AcroRd32.exe") |
42 if(os.path.isfile(readerexepath)): |
42 if(os.path.isfile(readerexepath)): |
43 os.spawnl(os.P_DETACH, readerexepath, "AcroRd32.exe", os.path.join(cwd, "doc","301_v04000201.pdf")) |
43 os.spawnl(os.P_DETACH, readerexepath, "AcroRd32.exe", '"%s"'%os.path.join(cwd, "doc","301_v04000201.pdf")) |
44 else: |
44 else: |
45 os.system("xpdf -remote DS301 %s &"%os.path.join(cwd, "doc","301_v04000201.pdf")) |
45 os.system("xpdf -remote DS301 %s &"%os.path.join(cwd, "doc","301_v04000201.pdf")) |
46 return True |
46 return True |
47 except: |
47 except: |
48 return """Check if xpdf is correctly installed on your computer""" |
48 return """Check if xpdf is correctly installed on your computer""" |