Changeset 55 for trunk/python/Rappture/number.py
- Timestamp:
- Sep 9, 2005 10:03:21 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/Rappture/number.py
r9 r55 9 9 10 10 class number: 11 def __init__(self,path, **kwargs):11 def __init__(self,path,id,**kwargs): 12 12 """ 13 13 Blah, blah... 14 14 """ 15 15 16 self.path = path 16 self.basePath = path 17 self.path = path + ".number(" + id + ")" 18 self.id = id 17 19 self.attribs = kwargs 18 20 … … 23 25 24 26 def __coerce__(self,other): 25 s = Rappture.driver.get(self.path+'.current') 27 attrList = Rappture.driver.children(self.path, "id") 28 attrName = 'default' 29 for attr in attrList: 30 if attr == 'current': 31 attrName = attr 32 s = Rappture.driver.get(self.path+'.'+attrName) 26 33 return (float(s),other)
Note: See TracChangeset
for help on using the changeset viewer.