python读xml中元素顺序问题
a.xml内容如下:
ae
pl
pp
ps
sa
相应的处理函数如下:
def GetexpectData(project,branch):
global locList
global cppcomponentss,componentReposityy;
cppcomponentss= {}
tree = ET.parse("a.xml")
p = getByAttr(tree.findall("project"),"name",project)
if p!=None:
compList = getByAttr(p.findall("componentList"),"table","cpp")
comps = compList.findall("expect")
for each in comps:
&
相关问答:
最近用python写一个程序,总是异常退出,但是却没法用try..except来捕捉
由于没法发图片,所以把相关的信息打印出来
异常的信息大致如下:
python.exe遇到问题需要关闭。我们对此引起的不便表示抱歉 ......
我运行一下程序:
import logging
def initlog():
logger = logging.getLogger()
hdlr = lo