本文整理汇总了Python中helper.Helper.run方法的典型用法代码示例。如果您正苦于以下问题:Python Helper.run方法的具体用法?Python Helper.run怎么用?Python Helper.run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类helper.Helper
的用法示例。
在下文中一共展示了Helper.run方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Clone_repo
# 需要导入模块: from helper import Helper [as 别名]
# 或者: from helper.Helper import run [as 别名]
def Clone_repo(DIR,repo_url,test_type):
cur_dir = os.getcwd()
os.chdir(DIR)
cmd = "git clone %s" % repo_url
ret = Helper.run(cmd,90)
if ret:
logging.info('git clone error')
os.chdir(cur_dir)
try:
shutil.rmtree(DIR)
except Exception,e:
logging.info('cannot delete fail-repo,please offline this station')
return (1,None)
示例2: basic_process
# 需要导入模块: from helper import Helper [as 别名]
# 或者: from helper.Helper import run [as 别名]
device_type = self.dev.GetValue()
global debug_port
if self.debug_port.GetValue()!='':
debug_port = self.debug_port.GetValue()
basic_process(platform,target,ide,debugger,serial,device_type,debug_port,iar,uv4,cw10,gcc_arm,demo,mingw,jlink)
try:
os.remove(import_support_file)
except Exception,e:
pass
print 'Generating app info,Please wait!'
try:
cmd = 'python ' + generator_file + ' ' + platform + ' ' + ide
Helper.run(cmd)
except Exception,e:
print e
else:
global applist_file
applist_file = main_path+'/app_info/'+ platform + '/'+ ide + '/app_list.yml'
frame4 = GoFrame(parent=None, id=-1)
frame4.Show()
class GoFrame(wx.Frame):
def __init__(self, parent, id):
wx.Frame.__init__(self, parent, id, 'FreeKV_demo Configuration Guide : Select',size=(frame_width+70,frame_height),pos=(600,300),style=wx.DEFAULT_FRAME_STYLE)
panel = wx.Panel(self)
self.staticLine1 = wx.StaticLine(panel,pos=(20,20),size=(450,1))
self.staticLine2 = wx.StaticLine(panel,pos=(20,static_line_height),size=(450,1))
示例3: while
# 需要导入模块: from helper import Helper [as 别名]
# 或者: from helper.Helper import run [as 别名]
ck_name = multi_list[0]
rc = 0
# remove index file to avoid sync fail
index_file = repo_dir + '/.git/index.lock'
try:
os.remove(index_file)
except Exception,e:
pass
# common operation
cur_dir = os.getcwd()
os.chdir(repo_dir)
logging.info( ' -- hard reset --')
cmd = "git reset --hard"
reset_ret = Helper.run(cmd)
logging.info(reset_ret)
rc = rc or reset_ret
logging.info( ' -- git clean --')
cmd = "git clean -fdx"
i = 0
clean_ret = 1
while(i<3 and clean_ret==1):
if Helper.run(cmd,20) == 0:
clean_ret = 0
else:
i = i + 1
logging.info(clean_ret)
rc = rc or clean_ret
logging.info( ' -- checkout master --')
cmd = "git checkout master"