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


Python ReplApplication.main方法代码示例

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


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

示例1: main

# 需要导入模块: from weboob.tools.application.repl import ReplApplication [as 别名]
# 或者: from weboob.tools.application.repl.ReplApplication import main [as 别名]
    def main(self, argv):
        self.load_config()

        try:
            self.do('init_optimizations').wait()
        except CallErrors as e:
            self.bcall_errors_handler(e)

        optimizations = self.storage.get('optims')
        for optim, backends in optimizations.iteritems():
            self.optims('start', backends, optim, store=False)

        return ReplApplication.main(self, argv)
开发者ID:dasimon,项目名称:weboob,代码行数:15,代码来源:havedate.py

示例2: main

# 需要导入模块: from weboob.tools.application.repl import ReplApplication [as 别名]
# 或者: from weboob.tools.application.repl.ReplApplication import main [as 别名]
    def main(self, argv):
        if len(argv) < 2:
            print >>self.stderr, 'Please give the name of the boobathon'
            return 1

        self.event = Event(argv[1], choice(self.weboob.backend_instances.values()))
        if self.event.description is None:
            if not self.ask("This event doesn't seem to exist. Do you want to create it?", default=True):
                return 1
            self.edit_event()
            self.save_event('Event created')

        return ReplApplication.main(self, [argv[0]])
开发者ID:juliaL03,项目名称:weboob,代码行数:15,代码来源:boobathon.py

示例3: main

# 需要导入模块: from weboob.tools.application.repl import ReplApplication [as 别名]
# 或者: from weboob.tools.application.repl.ReplApplication import main [as 别名]
    def main(self, argv):
        self.load_config()
        try:
            self.config.set('interval', int(self.config.get('interval')))
            if self.config.get('interval') < 1:
                raise ValueError()
        except ValueError:
            print('Configuration error: interval must be an integer >0.', file=self.stderr)
            return 1

        try:
            self.config.set('html', int(self.config.get('html')))
            if self.config.get('html') not in (0, 1):
                raise ValueError()
        except ValueError:
            print('Configuration error: html must be 0 or 1.', file=self.stderr)
            return 2

        return ReplApplication.main(self, argv)
开发者ID:P4ncake,项目名称:weboob,代码行数:21,代码来源:monboob.py

示例4: main

# 需要导入模块: from weboob.tools.application.repl import ReplApplication [as 别名]
# 或者: from weboob.tools.application.repl.ReplApplication import main [as 别名]
 def main(self, argv):
     self.load_config()
     return ReplApplication.main(self, argv)
开发者ID:Boussadia,项目名称:weboob,代码行数:5,代码来源:flatboob.py

示例5: main

# 需要导入模块: from weboob.tools.application.repl import ReplApplication [as 别名]
# 或者: from weboob.tools.application.repl.ReplApplication import main [as 别名]
 def main(self, argv):
     self.load_config(klass=YamlConfig)
     return ReplApplication.main(self, argv)
开发者ID:juliaL03,项目名称:weboob,代码行数:5,代码来源:flatboob.py


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