diff --git a/gui/Gui/Attackwindow.py b/gui/Gui/Attackwindow.py index 23f9f42..507701c 100644 --- a/gui/Gui/Attackwindow.py +++ b/gui/Gui/Attackwindow.py @@ -1,4 +1,5 @@ #!/usr/bin/python +from __future__ import division # 2.2+-only """ Scyther : An automatic verifier for security protocols. Copyright (C) 2007 Cas Cremers @@ -149,8 +150,8 @@ class AttackDisplay(wx.ScrolledWindow): self.box.Layout() step = 20 - xn = int(virtualwidth / step) + 1 - yn = int(virtualheight / step) + 1 + xn = int(virtualwidth // step) + 1 + yn = int(virtualheight // step) + 1 self.SetScrollbars(step,step,xn,yn,0,0) """ diff --git a/gui/Gui/Preference.py b/gui/Gui/Preference.py index ee5c882..740acd6 100644 --- a/gui/Gui/Preference.py +++ b/gui/Gui/Preference.py @@ -208,7 +208,7 @@ def init(): def get(key,alt=None): global prefs - if prefs.has_key(key): + if key in prefs.keys(): return prefs[key] else: return alt