From 13f3bcfda9416624cebbf5705de398e8efcad344 Mon Sep 17 00:00:00 2001 From: rahulp13 Date: Wed, 4 Mar 2020 14:47:28 +0530 Subject: display manual - os specific --- src/browser/UserManual.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/browser/UserManual.py b/src/browser/UserManual.py index 2ab15ef6..f31af29d 100644 --- a/src/browser/UserManual.py +++ b/src/browser/UserManual.py @@ -1,5 +1,7 @@ from PyQt4 import QtGui -import webbrowser +import subprocess +import platform +import os class UserManual(QtGui.QWidget): @@ -13,9 +15,14 @@ class UserManual(QtGui.QWidget): self.vlayout = QtGui.QVBoxLayout() - self.url = "library/browser/User-Manual/eSim_Manual_2019_Dec_31.pdf" - self.test = webbrowser.open( - "library/browser/User-Manual/eSim_Manual_2019_Dec_31.pdf", new=2) + file = os.path.realpath( + 'library/browser/User-Manual/eSim_Manual_2019_Dec_31.pdf' + ) + + if 'Win' in platform.system(): + os.startfile(file) + else: + subprocess.Popen(['xpdf.real', file], shell=False) self.setLayout(self.vlayout) self.show() -- cgit