comparison orpg/mapper/base_msg.py @ 36:d02e9197c066 ornery-orc

Traipse 'OpenRPG' {101220-00} Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc's main goal is to offer more advanced features and enhance the productivity of the user. Update Summary (Closed) New Features: New to Map, can re-order Grid, Miniatures, and Whiteboard layer draw order New to Server GUI, can now clear log New Earthdawn Dieroller New IronClaw roller, sheet, and image New ShapeShifter PC Sheet Updates: Update to Warhammer PC Sheet. Rollers set as macros. Should work with little maintanence. Update to Browser Server window. Display rooms with ' " & cleaner Update to Server. Handles ' " & cleaner Update to Dieroller. Cleaner, more effecient expression system Update to Hidden Die plugin, allows for non standard dice rolls Update to location.py, allows for more portable references when starting Traipse Update to the Features node Fixes: Fix to InterParse that was causing an Infernal Loop with Namespace Internal Fix to XML data, removed old Minidom and switched to Element Tree Fix to Server that was causing eternal attempt to find a Server ID, in Register Rooms thread Fix to Server, removing wxPython dependencies where not needed Fix to metaservers.xml file not being created Fix to Single and Double quotes in Whiteboard text Fix to Background images not showing when using the Image Server Fix to Duplicate chat names appearing Fix to Server GUI's logging output Fix to FNB.COLORFUL_TABS bug Fix to Gametree for XSLT Sheets Fix to Gametree for locating gametree files Fix to Send to Chat from Gametree Fix to Gametree, renaming and remapping operates correctly Fix to aliaslib, prevents error caused when SafeHTML is sent None
author sirebral
date Sun, 19 Dec 2010 22:44:36 -0600
parents ff154cf3350c
children
comparison
equal deleted inserted replaced
35:ee890f424e16 36:d02e9197c066
27 # 27 #
28 __version__ = "$Id: base_msg.py,v Traipse 'Ornery-Orc' prof.ebral Exp $" 28 __version__ = "$Id: base_msg.py,v Traipse 'Ornery-Orc' prof.ebral Exp $"
29 29
30 from threading import RLock 30 from threading import RLock
31 from orpg.networking.mplay_client import * 31 from orpg.networking.mplay_client import *
32 from xml.etree.ElementTree import ElementTree, Element 32 from xml.etree.ElementTree import ElementTree, Element, fromstring
33 33
34 class map_element_msg_base: 34 class map_element_msg_base:
35 # This is a base class 35 # This is a base class
36 36
37 def __init__(self,reentrant_lock_object = None): 37 def __init__(self,reentrant_lock_object = None):
214 def set_from_dom(self,xml_dom): 214 def set_from_dom(self,xml_dom):
215 # xml_dom must be pointing to an empty tag. Override in a derived class for <map/> and other similar tags 215 # xml_dom must be pointing to an empty tag. Override in a derived class for <map/> and other similar tags
216 self._from_dom(xml_dom,self.set_prop) 216 self._from_dom(xml_dom,self.set_prop)
217 217
218 def init_from_xml(self,xml): 218 def init_from_xml(self,xml):
219 xml_dom = parseXml(xml) 219 #xml_dom = parseXml(xml)
220 node_list = xml_dom.getElementsByTagName(self.tagname) 220 xml_dom = fromstring(xml)
221 #node_list = xml_dom.getElementsByTagName(self.tagname)
222 node_list = xml_dom.findall(self.tagname)
221 if len(node_list) < 1: print "Warning: no <" + self.tagname + "/> elements found in DOM." 223 if len(node_list) < 1: print "Warning: no <" + self.tagname + "/> elements found in DOM."
222 else: 224 else:
223 while len(node_list): self.init_from_dom(node_list.pop()) 225 while len(node_list): self.init_from_dom(node_list.pop())
224 if xml_dom: xml_dom.unlink() 226 #if xml_dom: xml_dom.unlink()
225 227
226 def set_from_xml(self,xml): 228 def set_from_xml(self,xml):
227 xml_dom = parseXml(xml) 229 #xml_dom = parseXml(xml)
228 node_list = xml_dom.getElementsByTagName(self.tagname) 230 xml_dom = fromstring(xml)
231 #node_list = xml_dom.getElementsByTagName(self.tagname)
232 node_list = xml_dom.findall(self.tagname)
229 if len(node_list) < 1: print "Warning: no <" + self.tagname + "/> elements found in DOM." 233 if len(node_list) < 1: print "Warning: no <" + self.tagname + "/> elements found in DOM."
230 else: 234 else:
231 while len(node_list): self.set_from_dom(node_list.pop()) 235 while len(node_list): self.set_from_dom(node_list.pop())
232 if xml_dom: xml_dom.unlink() 236 #if xml_dom: xml_dom.unlink()
233 237
234 # XML importers end 238 # XML importers end
235 ######################################### 239 #########################################