Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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:
        &


Ïà¹ØÎÊ´ð£º

python»·¾³±äÁ¿ÎÊÌâ

ÎÒ°Ñpython°²×°µ½ÁËC:\Python25
È»ºóÔÚWindows 7ϵͳ±äÁ¿µÄpathÖÐÌí¼ÓÁË C:\Python25;
È»ºóÖØÆôµçÄÔ
È»ºóÔÚcmdÖмüÈëpython»òPython¶¼ÎÞЧ¡£

ÕâÊÇΪʲô£¿
Windows 7»¹Ã»Óùý£¬

Äã¾ÍÖ±½ÓÓà ......

pythonÖÐÏß³ÌÎÊÌ⣿£¿

ÎÒÏÖÔÚÊÇÕâÑùµÄ
¿ªÁËÒ»¸ö×ÓỊ̈߳¬¶ÁÈ¡ÏÂÃæµÄÏûÏ¢
±¾ÒâÊÇ
Python code:

while not self._stopevent.isSet( ):
re=¶ÁȡϲãÏûÏ¢
if re>0:
´¦Àí
else:
pass

¼ÙÈ ......

python±àÒëÆ÷ÎÊÌâ

    ÎÒÏÖÔÚÓõÄÊÇeclipse ÄǸö²å¼þ£¬¿ÉÄÜÊÇÒòΪûÅäÖÃÃ÷°×µÄÎÊÌ⣬¸Ð¾õ²»ºÃ£¬Ã»ÓÐһЩ±ØÒªµÄ¹¦ÄÜ¡£
    ºóÀ´ÎÒ»»ÁËEric4£¬±Èeclipse²å¼þºÃÓò»ÉÙ£¬µ«ÊÇȱÉÙÒ»¸öÎÒ×îÏ£ÍûÓеŦÄÜ£º´úÂë×·×Ù£¬ ......

python×ÖµäÎÊÌâ

d = {"a":"a","b":"b","c":"c"}
print d

ΪʲôÊä³öÊÇ:{'a': 'a', 'c': 'c', 'b': 'b'} ......

Python + Tkinter ´°¿ÚËõ·ÅÎÊÌâ

ѧϰÓÃpython+tkдÁËÒ»¸ö¼òµ¥½Å±¾£¬ÓÃÀ´ÏÔʾһЩͼƬºÍÆä˵Ã÷£¬Éè¼Æ2¸ö°´Å¥À´·­Ò³¡£¿Ø¼þ²ÉÓÃpack()·½Ê½£¬Ö÷´°¿ÚûÓÐÌØ±ðÖ¸¶¨³ß´ç£¬°´Ï·­Ò³°´Å¥ºóÄÜ×Ô¶¯ÒÀ¾ÝÄÚÈÝ×Ô¶¯Ëõ·Å´óС£¬ÈçÔ¤ÆÚÉèÏë¡£²»¹ý±È½ÏÆæ¹ÖµÄÊÇ,Èç¹ûÓÃÊ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ