Before, we were using both __file__ as well as sys.argv[0] to determine the base directory
for Scyther, and we were not taking symlinks into account.
By using the inspect module, we can consistently pick the current frame and derive
the file from that, then use realpath to strip symlinks.
To do: We still need better error handling.
- File exists: overwrite?
- Write failed popup.
- Check for empty file at the end (what if dot does not support this particular
output format?)
A long requested feature was the option to print graphs more nicely.
This is a solution for knowledgeable users: the dot data is more basic
and can be converted in various ways.
TODO: Simple image export.
Reported by ETH students last year: if you include a file, where the file has an
error in a line with a number higher than the original, the Python code crashes.
This is a *patch* only because the real underlying problem is that error reporting
does not take include commands into account, and does not propagate any
file names.
Passing the '--all-attacks' switch to the backend was not working. The reason
was the hack to get Vista working hardcoded cutting to the last attack found.
In the long term, this needs to be cleaned up, and cutting should be moved back
nicely to the Scyther C code where it used to work. Once done, switches.useAttackBuffer
can be set back to true.
BUGFIX: When cutting attacks/patterns, counts are no longer exact.
Currently, both my Feisty Ubuntu's have stopped working with the GUI of
Scyther. So to be on the safe side, PIL is disabled for now, until I've
resolved the problem.
The error is the following:
---------------------------------------------------------------------------
Traceback (most recent call last):
File "/home/cas/src/scyther-dev/gui/Gui/Scytherthread.py", line 351, in onViewButton
w = Attackwindow.AttackWindow(btn.claim)
File "/home/cas/src/scyther-dev/gui/Gui/Attackwindow.py", line 176, in __init__
self.CreateInteriorWindowComponents()
File "/home/cas/src/scyther-dev/gui/Gui/Attackwindow.py", line 209, in CreateInteriorWindowComponents
dp = AttackDisplay(self, self, attacks[0])
File "/home/cas/src/scyther-dev/gui/Gui/Attackwindow.py", line 73, in __init__
self.original = Image.open(filename)
File "/usr/lib/python2.5/site-packages/PIL/Image.py", line 1912, in open
return factory(fp, filename)
File "/usr/lib/python2.5/site-packages/PIL/ImageFile.py", line 82, in __init__
self._open()
File "/usr/lib/python2.5/site-packages/PIL/EpsImagePlugin.py", line 277, in _open
raise IOError, "cannot determine EPS bounding box"
IOError: cannot determine EPS bounding box
---------------------------------------------------------------------------
Great. Bounding boxes in eps again.
Since a while, wxPython has been refusing to correctly display strings with a dash in them in the staticText object. Given a string "xx-yy", only "xx" is displayed. This caused some problems for protocols with dashes in their protocol names. I've worked around it by replacing all occurrences of "-" by "_".