comparison engine/extensions/pychan/attrs.py @ 143:fe7ff4808529

- added guichan slider widget to pychan gui wrapper - added new attribute class to attrs.py (FloatAttr) - added demo to pychan demo client NOTE: - demo isn't nice yet - but I'll refactor the client anyway
author chewie@33b003aa-7bff-0310-803a-e67f0ece8222
date Tue, 07 Oct 2008 02:12:57 +0000
parents 9a1529f9625e
children 06dddc96ce54
comparison
equal deleted inserted replaced
142:816b17db2bec 143:fe7ff4808529
83 if value not in (0,1): 83 if value not in (0,1):
84 raise ParserError("Expected a 0 or 1.") 84 raise ParserError("Expected a 0 or 1.")
85 return value 85 return value
86 except: 86 except:
87 raise ParserError("Expected a 0 or 1.") 87 raise ParserError("Expected a 0 or 1.")
88
89 class FloatAttr(Attr):
90 def parse(self, value):
91 try:
92 return float(value)
93 except:
94 raise ParseError("Expected a float.")