python¶ÁxmlÖÐÔªËØË³ÐòÎÊÌâ
a.xmlÄÚÈÝÈçÏÂ:
</project>
<project name="asdf" branch="asfasdfas" naname="xiao xin" QD6="091010">
<componentList table="cpp">
<entry>ae </entry>
<entry>pl </entry>
<entry>pp </entry>
<entry>ps </entry>
<entry>sa </entry>
</componentList>
<componentList table="java">
</componentList>
</project>
ÏàÓ¦µÄ´¦Àíº¯ÊýÈçÏ£º
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:
&
Ïà¹ØÎÊ´ð£º
ÎÒÔËÐÐһϳÌÐò£º
import logging
def initlog():
logger = logging.getLogger()
hdlr = logging.FileHandler('D:\log_fram.log')
f ......
²é¿´ÊÓÆµÏêϸÇëµã»÷:
Let's PythonϵÁÐÊÓÆµÕýʽ·¢²¼
лл´ó¼ÒµÄÖ§³Ö, ºóÐøÊÓÆµ½«»á¸ü¼Ó¾«²Ê
¹Ø×¢¡£¡£¡£
¶¥Ò»ÏÂ˯¾õ.....
Let's Python ϵÁÐÊÓÆµÕýʽ·¢²¼ÁË
²é¿´ÊÓÆµÏê ......
ÎÒÓÐC/C++£¬JAVAµÄ»ù´¡£¬µ«Ã»Óлù´¡¹ý½Å±¾ÓïÑÔ£¬ÔÚÍøÉÏÕÒµç×ÓÊé¸Ð¾õ¿´ÆðÀ´²»Ë¬£¬ÈÏΪ»¹ÊÇӡˢƷ×Ô¼º±È½Ïϲ»¶£¬ËÄܸøÎÒÍÆ¼öÒ»±¾ÕâÑùµÄPythonÊ飺
1.´Ó»ù´¡½²Æð£¬ÒÔÉîÈë½áÊø
2.ʵÓÃÖÁÉÏ£¬ÀíÂÛÍ걸
3.×îºÃÊ ......
¶¨ÒåÏÂÃæÕâÑùÒ»¸öº¯Êý£¬½«excel±í¸ñÖÐÁ½¸öµ¥Ôª¸ñµÄÄÚÈÝÁ¬³ÉÒ»¸ö×Ö·û´®£¬µ«ÊÇÈç¹ûǰһ¸öµ¥Ôª¸ñµÄÄÚÈÝÊÇÊý×Ö£¬±ÈÈçÊÇ¡°1¡±£¬ºóÒ»¸öµ¥Ôª¸ñµÄÊÂ×Ö·û´®£¬¾Í»á±¨´íunsupported operand type(s) for +=: 'float' an ......
ÏêϸÐÅÏ¢Çë²é¿´:
http://blog.csdn.net/lgg201/archive/2009/10/08/4643635.aspx
Let's-python-ϵÁÐÊÓÆµ·¢²¼×¨Ìù ÊÕ²Ø
ÊÓÆµ½ÏÔçµÄʱºò¾Í˵ÊÇҪ¼ÁË, ÕâÒ»ÖܼÁ˵ÚÒ»¼¯, ÓÉÓÚµÚÒ»´Î¼ÊÓÆµ, ......