Mercurial > fife-parpg
diff 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 |
line wrap: on
line diff
--- a/engine/extensions/pychan/attrs.py Sun Oct 05 15:27:31 2008 +0000 +++ b/engine/extensions/pychan/attrs.py Tue Oct 07 02:12:57 2008 +0000 @@ -85,3 +85,10 @@ return value except: raise ParserError("Expected a 0 or 1.") + +class FloatAttr(Attr): + def parse(self, value): + try: + return float(value) + except: + raise ParseError("Expected a float.")