¡¾ÇóÖú¡¿python´«ÏµÍ³²ÎÊýÎÞ·¨´«È룬¼±£¡
ÎÒÔÚÅú´¦ÀíÖе÷ÓÃpython½Å±¾
ÈçÏ£º
call %pyscript%\StaticResult.py -s D:\DailySDV\Bts8.1\TestLog\TestResult.xml -d %CiRoot_WndPath%\cruisecontrol\userData\groups\group01\projects\%ProjectName%\%GtrRltPath%\!GtrRltNameStr!.xml -t %CiRoot_WndPath%\cruisecontrol\userData\groups\group01\projects\%ProjectName%\script\batmass\TestDuration.xml
µ«´òӡϵͳ²ÎÊýÏÔʾ£¬
#´«Èë²ÎÊý´¦Àí
print sys.argv
·¢ÏÖÉÏÃæ²ÎÊý¸ù±¾Ã»Óб»´«È룬ͬÑù½Å±¾ÔÚÆäËû»úÆ÷ÉÏûÓиÃÎÊÌ⣬²»ÖªµÀÊÇʲôÔÒòÁË£¬ÇóÖú¸÷λ´óÏÀ¡£¡£
ÕâÖÖ²ÎÊýÐèÒª×ö¸ö·ÖÎöµÄ£¬²»ÄÜÖ±½ÓʹÓõģ¡
ÕâÀïÓиöÀý×Ó£º
class update:
def __init__(self, args):
self.parseCMD(args)
projectPath = self.opts.VCProjectPath
¡£¡£¡£¡£
def parseCMD(self, args):
parser = OptionParser()
parser.add_option("-b", "--BoardName", dest="BoardName",\
help="the board name", default="")
parser.add_option("-p", "--ProjectPath", dest="VCProjectPath",\
help="the path of VC project", default="")
parser.add_option("-t", "--TestCasePath", dest="TestCasePath",\
help="the path of TestCase", default="")
Ïà¹ØÎÊ´ð£º
Ïñ C µÄ scanf() ÄÇÑù
±ÈÈç¶ÁÈë 1 2 3 a b c
ÿ´Î¶ÁÈëÒ»¸ö
ÏÂÃæÕâ¸öÓ¦¸ÃÊÇÄãÏëÒªµÄ°É£º
Python code:
>>> k = raw_input()
0 0123 ds dsl sd
>>> k
'0 0123 ds dsl sd'
>>> ......
ÔÚÎı¾ÎļþÖÐÆ¥ÅäÏî°üº¬ÖÐÎÄ
ÈçÄÚÈÝΪ£ºgamename=ÖÐÎÄ
key=ÌìÏÂ
Îı¾ÎļþµÄ±àÂëµÄÎļþΪutf-8
python´úÂëÈçÏ£º
# -*- coding:UTF-8 -*-
contents=open(from_pa ......
pythonµÄPIL¿â×Ô´øµÄ·½·¨Ö»ÄܽøÐоØÐεÄÇиÈç¹ûÎÒÓÐÁËÒ»¸ö¶à±ßÐθ÷¸ö¶¥µãµÄ×ø±ê£¬ÈçºÎ¶ÔÏÖÓеÄͼƬ°´ÕÕÕâ¸ö¶à±ßÐνøÐÐÇиîÄØ£¿
²»Ò»¶¨ÒªÓÃPIL¿â£¬ÈκÎÄÜʵÏÖÕâ¸ö¹¦Äܵķ½·¨¶¼ÐС£
ͼƬÇиîµÄjs²»ÊǺܶàÂð£¿
......
ÇëÎʸßÊÖ£¬pythonÀïµÄpopenÀàËÆjavaÀïµÄÄĸöÀà»òÕß·½·¨ÄØ£¿£¿ÁíÍâjython¿ª·¢java¸ÃÈçºÎʹÓÃjythonÄØ£¿£¿
1.¿ÉÄܺÍjavaÀïµÄRuntime.getRuntime().exec£¨"ϵͳÃüÁî"£©; Æô¶¯½ø³Ì
2.eclipseÏÂÔØjython ²å¼ ......
ÎÒÓÃpython¿ª·¢ÁËÒ»×éGUI½çÃ棬ÁíÍâÒ»¸öͬ־ÓÃjavaʵÏÖÁËÓ¦ÓÃÖ÷¿ò¼Ü£¬ÏÖÔÚÒª½«ÕâЩGUI½çÃ漯³Éµ½Ö÷¿ò¼ÜÀïÃæÈ¥¡£²»ÖªµÀÔÚjavaÀïÃæ¸ÃÈçºÎµ÷Ó㿼ò¶øÑÔÖ®£¬¾ÍÊÇjava´úÂëÀïÃæÈçºÎµ÷ÓÃÒ»¸öÍⲿµÄ.pyÎļþ¡£Çë¸ø³öÒ»¸ö¼òµ¥µ ......