From fd2cda186ad308833753ada16dbc7aa18277e183 Mon Sep 17 00:00:00 2001 From: yvesf Date: Tue, 20 Apr 2010 19:43:34 +0000 Subject: foo git-svn-id: http://10.2.2.13/svn/common/ebus@1662 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd --- test.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'test.py') diff --git a/test.py b/test.py index 292ac42..2558be8 100644 --- a/test.py +++ b/test.py @@ -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" + -- cgit v1.2.1