当前位置: 首页>>代码示例>>Python>>正文


Python Helper.run方法代码示例

本文整理汇总了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)
开发者ID:lingxia,项目名称:station_gui,代码行数:15,代码来源:Repo_processor.py

示例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))
开发者ID:lingxia,项目名称:FreeKV_demo_gui,代码行数:33,代码来源:start.py

示例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"
开发者ID:lingxia,项目名称:station_gui,代码行数:33,代码来源:Repo_processor.py


注:本文中的helper.Helper.run方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。