Skip to content

Commit

Permalink
Corrected missing README and PDF manual in GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
jcumby committed Jul 22, 2017
1 parent 4beb7d6 commit 91571fc
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions pieface/pieface_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,26 +222,23 @@ def _quit(self):
def viewreadme(self):
""" Open README file in default viewer """

# Try to get README location based on multiCIF location
README = pkg_resources.resource_filename('pieface_docs', 'README.pdf')
#README = os.path.abspath(os.path.join( multiCIFloc, '..', 'README.pdf'))


if os.path.isfile(README):
try:
# Try to get README location based on multiCIF location
README = pkg_resources.resource_filename('pieface_docs', 'README.pdf')
#README = os.path.abspath(os.path.join( multiCIFloc, '..', 'README.pdf'))
webbrowser.open(README)
else:
except:
tkMessageBox.showerror("Error", "Cannot find README location")

def viewhelp(self):
""" Open help file in default viewer """

# Try to get help file location based on multiCIF location
PDFhelp = pkg_resources.resource_filename('pieface_docs', 'PIEFACE_manual.pdf')
#PDFhelp = os.path.abspath(os.path.join( multiCIFloc, '..', 'docs', 'PIEFACE_manual.pdf'))

if os.path.isfile(PDFhelp):
try:
# Try to get help file location based on multiCIF location
PDFhelp = pkg_resources.resource_filename('pieface_docs', 'PIEFACE_manual.pdf')
#PDFhelp = os.path.abspath(os.path.join( multiCIFloc, '..', 'docs', 'PIEFACE_manual.pdf'))
webbrowser.open(PDFhelp)
else:
except:
tkMessageBox.showerror("Error", "Cannot find help file location")

def viewinternethelp(self):
Expand Down

0 comments on commit 91571fc

Please sign in to comment.