- Turned the scyther.py into a usable standalone file.

- Added error tests.
This commit is contained in:
ccremers
2005-03-03 15:25:59 +00:00
parent 7b8ac9c14a
commit 531f0aa469
3 changed files with 82 additions and 14 deletions

View File

@@ -67,12 +67,18 @@ def from_others():
return list_ppfix(list, "../spdl/","")
def from_all():
return from_literature() + from_others()
def select(type):
list = from_literature()
if int(type) == 0:
n = int(type)
if n == 0:
# 0 means all protocols
list = list + from_others()
return list
return from_all()
elif n == 1:
# 1 means from literature
return from_literature()
else:
# Otherwise empty list
return []