Skip to content

Commit

Permalink
Clarify how to set executable path for #327
Browse files Browse the repository at this point in the history
  • Loading branch information
markummitchell-tu committed May 20, 2019
1 parent 53640f4 commit fb143dc
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions contrib/python/ParseDig.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,25 @@
import subprocess
import sys

# Operating system dependent location of Engauge executable. Some values are:
# cygwin /usr/bin/engauge-digitizer.exe
# linux
# osx
# windows C:/Program Files/Engauge Digitizer/engauge.exe
ENGAUGE_EXECUTABLE = "../../bin/engauge"
ENGAUGE_EXECUTABLE = "../../dev/windows/Engauge Digitizer/engauge.exe"

# Operating system dependent location of Engauge executable. Some typical values are:
# cygwin /usr/bin/engauge-digitizer.exe
# linux /usr/bin/engauge
# osx /Applications/Engauge\ Digitizer.app/Contents/MacOS/Engauge\ Digitizer
# windows C:/Program Files/Engauge Digitizer/engauge.exe
ENGAUGE_EXECUTABLE = "/usr/bin/engauge"

NO_EXE_ERROR = 'Execution error. You may need to modify ENGAUGE_EXECUTABLE to find the Engauge executable. ' + \
'Version 11.3 or newer is required'

class ParseDig:
def __init__(self, digFile):
# Hash table of curve name to lists, with each list consisting of graph points
self._curves = DefaultListOrderedDict()

if not os.path.exists (ENGAUGE_EXECUTABLE):
print (NO_EXE_ERROR)
sys.exit (0)

try:
with open(digFile, 'rt') as f:
tree = ElementTree.parse (f)
Expand Down Expand Up @@ -160,7 +166,7 @@ def upgrade (self, digFile):
"-upgrade",
digFile])
if rtn:
print ('Execution error. You may need to modify ENGAUGE_EXECUTABLE to find the Engauge executable')
print (NO_EXE_ERROR)
sys.exit (0)

return digFileUpgraded

0 comments on commit fb143dc

Please sign in to comment.