[sldev-commits] r1734 - in projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp: . lib lib/base lib/base/message lib/base/message/data lib/base/message/tests lib/base/network lib/base/network/tests lib/base/tests

enus.linden at svn.secondlife.com enus.linden at svn.secondlife.com
Fri Jan 30 13:30:59 PST 2009


Author: enus.linden
Date: 2009-01-30 15:30:59 -0600 (Fri, 30 Jan 2009)
New Revision: 1734

Modified:
   projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/
   projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/
   projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/
   projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/message/
   projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/message/data/
   projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/message/template_dict.py
   projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/message/template_parser.py
   projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/message/tests/
   projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/network/
   projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/network/tests/
   projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/tests/
Trac: http://svn.secondlife.com/trac/linden/changeset/1734
Log:
adding svn:ignores in nested dirs, minor tweak to template_dict.py to enable a dump of all packet names, added comment about regex in parsing the template file


Property changes on: projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp
___________________________________________________________________
Name: svn:ignore
   + *.pyc



Property changes on: projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib
___________________________________________________________________
Name: svn:ignore
   + *.pyc



Property changes on: projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base
___________________________________________________________________
Name: svn:ignore
   + *.pyc



Property changes on: projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/message
___________________________________________________________________
Name: svn:ignore
   + *.pyc



Property changes on: projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/message/data
___________________________________________________________________
Name: svn:ignore
   + *.pyc


Modified: projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/message/template_dict.py
===================================================================
--- projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/message/template_dict.py	2009-01-30 21:00:09 UTC (rev 1733)
+++ projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/message/template_dict.py	2009-01-30 21:30:59 UTC (rev 1734)
@@ -37,6 +37,8 @@
             parser = MessageTemplateParser(msg_tmpl)
             template_list = parser.message_templates
             template_dict = TemplateDictionary(template_list)
+            # adding below so we can check how many packets we can parse easily len(self.template_list)
+            self.template_list = template_list
 
         # maps name to template
         self.message_templates = {}
@@ -47,6 +49,12 @@
         self.build_dictionaries(template_list)
         self.build_message_ids()
 
+    def get_template_list(self):
+        names = []
+        for i in self.template_list:
+            names.add(i.name)
+        return names
+
     def build_dictionaries(self, template_list):
         for template in template_list:
             self.message_templates[template.name] = template

Modified: projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/message/template_parser.py
===================================================================
--- projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/message/template_parser.py	2009-01-30 21:00:09 UTC (rev 1733)
+++ projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/message/template_parser.py	2009-01-30 21:30:59 UTC (rev 1734)
@@ -75,6 +75,7 @@
                     self.version = float(parts[0])
             
             #get packet header, starting a new packet
+            # ToDo: this regex needs to accomodate the case where 4 spaces are used in place of a tab and start of line
             packet_header = re.match("^\t([^\t{}]+.+)",line) #gets packet headers
             if packet_header != None:
                 parts = packet_header.group(1)


Property changes on: projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/message/tests
___________________________________________________________________
Name: svn:ignore
   + *.pyc



Property changes on: projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/network
___________________________________________________________________
Name: svn:ignore
   + *.pyc



Property changes on: projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/network/tests
___________________________________________________________________
Name: svn:ignore
   + *.pyc



Property changes on: projects/2008/pyogp/pyogp.lib.base/branches/enus-event-handling/pyogp/lib/base/tests
___________________________________________________________________
Name: svn:ignore
   + *.pyc




More information about the sldev-commits mailing list