Changeset 9a95b3 in git for modules/openmathserver/objects.py
- Timestamp:
- Jun 14, 2005, 11:48:02 AM (18 years ago)
- Branches:
- (u'spielwiese', 'd0474371d8c5d8068ab70bfb42719c97936b18a6')
- Children:
- bb3e2b01b8b571e1ce0e1df85bcb71fb0ccb8e9d
- Parents:
- 50225ad7ef398575b5988f3bb049c8b508002f04
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/openmathserver/objects.py
r50225a r9a95b3 11 11 except AttributeError: 12 12 try: 13 return self. children13 return self.__children 14 14 except AttributeError: 15 15 return [] … … 20 20 except AttributeError: 21 21 try: 22 del self. children22 del self.__children 23 23 except AttributeError: 24 24 pass … … 27 27 self.setChildren(children) 28 28 except AttributeError: 29 self. children=children29 self.__children=children 30 30 def __getBody(self): 31 31 try: … … 33 33 except AttributeError: 34 34 try: 35 return self. body35 return self.__body 36 36 except AttributeError: 37 37 return None … … 42 42 except AttributeError: 43 43 try: 44 del self. body44 del self.__body 45 45 except AttributeError: 46 46 pass … … 49 49 self.setBody(body) 50 50 except AttributeError: 51 self. body=body51 self.__body=body 52 52 children=property(__getChildren, __setChildren,__delChildren,\ 53 53 """ children in an OMtree""") … … 57 57 try: 58 58 attr=self.XMLAttributes() 59 attrstr=" " .join([a.encode(context) for a in attr])59 attrstr=" "+" ".join([a.encode(context) for a in attr]) 60 60 except: 61 61 attrstr="" 62 opening="".join(["<", self. xmltag, " ", attrstr,">"])62 opening="".join(["<", self.XMLtag, attrstr,">"]) 63 63 children=self.children 64 64 if children: … … 68 68 if not body: 69 69 body="" 70 body=context.xmlEncodeBody(body) 71 closing="".join(["</"+self.xmltag+">"]) 70 assert body!=None 71 body=context.XMLEncodeBody(body) 72 assert body!=None 73 closing="".join(["</"+self.XMLtag+">"]) 72 74 return "".join([opening,body,closing]) 73 75 class OMvar(OMobject): … … 136 138 def setBody(self, value): 137 139 raise OperationNotPossibleError 140 XMLtag="OMI" 138 141 class OMfloat(SimpleValue): 139 142 def __init__(self,value): … … 182 185 i=OMint(22482489) 183 186 print i.body 184 i.body="dshj" 187 print i.XMLencode(context) 188 #i.body="dshj" 185 189
Note: See TracChangeset
for help on using the changeset viewer.