From 6629b295594a1f870ef06055d2fe5176a5de33b0 Mon Sep 17 00:00:00 2001 From: ccremers Date: Fri, 24 Nov 2006 08:00:03 +0000 Subject: [PATCH] - Fixed stuff for Python versions that do not support __file__ well, by basically requiring that the Scyther binary can be found in PATH. --- gui/Bin/scytherview.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gui/Bin/scytherview.py b/gui/Bin/scytherview.py index 4fbdb4b..278c9da 100755 --- a/gui/Bin/scytherview.py +++ b/gui/Bin/scytherview.py @@ -5,9 +5,12 @@ # This is a simple hack to be able to quickly use the graphical output # of Scyther if one only has graphviz, but not elementtree and wxPython. # -# Notes: only works under Linux currently, because of silly assumptions +# Note 1: only works under Linux currently, because of silly assumptions # on temporary directories and pdf viewers. # +# Note 2: this code assumes that both scyther-linux and dot can be found in the +# environment (i.e. PATH variable) +# import os,sys,commands import os.path @@ -30,7 +33,7 @@ def generateTemp(extension='tmp'): def scyther_to_dotfile(): """ Run Scyther, return dotfile name """ - scythername = os.path.join(os.path.dirname(__file__),"scyther-linux") + scythername = "scyther-linux" args = " ".join(sys.argv[1:]) tmpdotfile = generateTemp('dot')