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


Python Engine.run方法代码示例

本文整理汇总了Python中Engine.Engine.run方法的典型用法代码示例。如果您正苦于以下问题:Python Engine.run方法的具体用法?Python Engine.run怎么用?Python Engine.run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Engine.Engine的用法示例。


在下文中一共展示了Engine.run方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: mainfunc

# 需要导入模块: from Engine import Engine [as 别名]
# 或者: from Engine.Engine import run [as 别名]
def mainfunc():
    """The entry point. Note, if you want dont want argument parsing, feel free to directly use Engine class"""

    engine = None
    skippass2 = False
    datadumpdirectory = None
    indexgit = None
    customindexfile = None
    indexentries = None
    testentries = None
    indexgitbranch = "master"

    cmdargs = initparser().parse_args()

    # Set up the parameters to Engine, based on argument parsing.

    if cmdargs.indexgiturl is not None and cmdargs.customindexfile is not None:
        Logger().log(Logger.error,
                     "indexgiturl and customindexfile are mutually exclusive. So please specify either one")
        exit(5)

    if cmdargs.indexgiturl is not None:
        indexgit = cmdargs.indexgiturl[0]

    if cmdargs.indexgitbranch is not None:
        indexgitbranch = cmdargs.indexgitbranch[0]

    if cmdargs.customindexfile is not None:
        customindexfile = cmdargs.customindexfile[0]

    if cmdargs.skippass2 is not None:
        skippass2 = cmdargs.skippass2

    if cmdargs.datadumpdirectory is not None:
        datadumpdirectory = cmdargs.datadumpdirectory[0]

    if cmdargs.indexentry is not None:

        indexentries = []
        for item in cmdargs.indexentry:
            indexentries.append(int(item[0]))

    if cmdargs.testentry is not None:
        testentries = cmdargs.testentry

    engine = Engine(datadumpdirectory=datadumpdirectory, indexgit=indexgit, customindexfile=customindexfile,
                    skippass2=skippass2, specificindexentries=indexentries, testindexentries=testentries,
                    indexgitbranch=indexgitbranch)

    status = engine.run()

    if not status:
        exit(1)

    return
开发者ID:rtnpro,项目名称:container-pipeline-service,代码行数:57,代码来源:__init__.py

示例2: loading

# 需要导入模块: from Engine import Engine [as 别名]
# 或者: from Engine.Engine import run [as 别名]
    def loading(self):
        """Loading state loop."""
        done = Engine.run(self)
        self.clearScreen()

        if self.data.essentialResourcesLoaded():
            if not self.loadingScreenShown:
                self.loadingScreenShown = True
                Dialogs.showLoadingScreen(self, self.data.resourcesLoaded)
                if self.startupLayer:
                    self.view.pushLayer(self.startupLayer)
                self.mainloop = self.main
            self.view.render()
        self.video.flip()
        return done
开发者ID:Hawkheart,项目名称:fof-reborn,代码行数:17,代码来源:GameEngine.py

示例3: main

# 需要导入模块: from Engine import Engine [as 别名]
# 或者: from Engine.Engine import run [as 别名]
    def main(self):
        """Main state loop."""

        # Tune the scheduler priority so that transitions are as smooth as possible
        if self.view.isTransitionInProgress():
            self.boostBackgroundThreads(False)
        else:
            self.boostBackgroundThreads(True)

        done = Engine.run(self)
        self.clearScreen()
        self.view.render()
        if self.debugLayer:
            self.debugLayer.render(1.0, True)
        self.video.flip()
        return done
开发者ID:Hawkheart,项目名称:fof-reborn,代码行数:18,代码来源:GameEngine.py

示例4: get_parser

# 需要导入模块: from Engine import Engine [as 别名]
# 或者: from Engine.Engine import run [as 别名]
    parser.add_argument(
        "-c",
        "--cleanup",
        help="Specify to force cleanup of test bench. If your running multiple times on same system,"
        " this is not recommended as it will require downloading of repositories again and again",
        action="store_true"
    )

    return parser


if __name__ == '__main__':

    cmd_args = get_parser().parse_args()
    clean_up = False

    index = cmd_args.index

    if cmd_args.cleanup is not None and cmd_args.cleanup:
        clean_up = True

    e = Engine(index_path=index, cleanup=clean_up)
    status, status_list, dependency_graph = e.run()

    if cmd_args.list is not None and cmd_args.list:
        for item in status_list:
            print item

    if not status:
        exit(1)
开发者ID:kbsingh,项目名称:container-pipeline-service,代码行数:32,代码来源:__init__.py


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