diff options
author | yvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd> | 2010-04-20 19:43:34 +0000 |
---|---|---|
committer | yvesf <yvesf@d0e8fea9-7529-0410-93fb-d39fd5b9c1dd> | 2010-04-20 19:43:34 +0000 |
commit | fd2cda186ad308833753ada16dbc7aa18277e183 (patch) | |
tree | 9d124a05ae33dda9298b07db6633091b5be94580 /test.py | |
parent | 7654c1cfe6a14b07a9d8f7cf19a9b9a5e3f2d8ae (diff) | |
download | ebus-alt-fd2cda186ad308833753ada16dbc7aa18277e183.tar.gz ebus-alt-fd2cda186ad308833753ada16dbc7aa18277e183.zip |
foo
git-svn-id: http://10.2.2.13/svn/common/ebus@1662 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd
Diffstat (limited to 'test.py')
-rw-r--r-- | test.py | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -1,16 +1,4 @@ #!/usr/bin/env python2.5 -import os -from lxml import objectify -from lxml import etree -class EbusProtocol: - doc = objectify.parse(open( - os.path.join( os.path.dirname(__file__), "ebus/ebus_specification.xml"))) - @staticmethod - def get_packet(primary, secondary): - return (EbusProtocol.doc.xpath("/ebus/packets/packet[@primary=$primary and @secondary=$secondary]", - primary=primary,secondary=secondary) or [None])[0] -p=EbusProtocol.get_packet("0x05","0x07") -for field in p.fields.iterchildren(): - print field.tag,field.get("name"), "l" + |