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


Python text.join函数代码示例

本文整理汇总了Python中celery.utils.text.join函数的典型用法代码示例。如果您正苦于以下问题:Python join函数的具体用法?Python join怎么用?Python join使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: get_command_info

    def get_command_info(self, command, indent=0, prefix="", color=None, help=False):
        if help:
            help = "|" + text.indent(self.choices[command][1], indent + 4)
        else:
            help = None
        try:
            # see if it uses args.
            meth = getattr(self, command)
            return text.join(["|" + text.indent("%s%s %s" % (prefix, color(command), meth.__doc__), indent), help])

        except AttributeError:
            return text.join(["|" + text.indent(prefix + str(color(command)), indent), help])
开发者ID:bensternthal,项目名称:firefox-flicks,代码行数:12,代码来源:celery.py

示例2: get_command_info

    def get_command_info(self, command, indent=0, prefix='', color=None,
            help=False):
        if help:
            help = '|' + text.indent(self.choices[command][1], indent + 4)
        else:
            help = None
        try:
            # see if it uses args.
            meth = getattr(self, command)
            return text.join([
                '|' + text.indent('{0}{1} {2}'.format(prefix, color(command),
                                                meth.__doc__), indent), help,
            ])

        except AttributeError:
            return text.join([
                '|' + text.indent(prefix + str(color(command)), indent), help,
            ])
开发者ID:e98cuenc,项目名称:celery,代码行数:18,代码来源:celery.py

示例3: get_command_info

 def get_command_info(self, command, indent=0, color=None):
     colored = term.colored().names[color] if color else lambda x: x
     obj = self.commands[command]
     if obj.leaf:
         return '|' + text.indent("celery %s" % colored(command), indent)
     return text.join([
         " ",
         '|' + text.indent("celery %s --help" % colored(command), indent),
         obj.list_commands(indent, "celery %s" % command, colored),
     ])
开发者ID:leobantech,项目名称:celery,代码行数:10,代码来源:celery.py

示例4: get_command_info

 def get_command_info(self, command, indent=0, color=None):
     colored = term.colored().names[color] if color else lambda x: x
     obj = self.commands[command]
     cmd = 'celery {0}'.format(colored(command))
     if obj.leaf:
         return '|' + text.indent(cmd, indent)
     return text.join([
         ' ',
         '|' + text.indent('{0} --help'.format(cmd), indent),
         obj.list_commands(indent, 'celery {0}'.format(command), colored),
     ])
开发者ID:chrisw1229,项目名称:celery,代码行数:11,代码来源:celery.py

示例5: get_command_info

 def get_command_info(self, command, indent=0, color=None):
     colored = term.colored().names[color] if color else lambda x: x
     obj = self.commands[command]
     cmd = "celery {0}".format(colored(command))
     if obj.leaf:
         return "|" + text.indent(cmd, indent)
     return text.join(
         [
             " ",
             "|" + text.indent("{0} --help".format(cmd), indent),
             obj.list_commands(indent, "celery {0}".format(command), colored),
         ]
     )
开发者ID:frol,项目名称:celery,代码行数:13,代码来源:celery.py

示例6: get_command_info

 def get_command_info(cls, command, indent=0,
                      color=None, colored=None, app=None):
     colored = term.colored() if colored is None else colored
     colored = colored.names[color] if color else lambda x: x
     obj = cls.commands[command]
     cmd = 'celery {0}'.format(colored(command))
     if obj.leaf:
         return '|' + text.indent(cmd, indent)
     return text.join([
         ' ',
         '|' + text.indent('{0} --help'.format(cmd), indent),
         obj.list_commands(indent, 'celery {0}'.format(command), colored,
                           app=app),
     ])
开发者ID:alekibango,项目名称:celery,代码行数:14,代码来源:celery.py

示例7: get_command_info

 def get_command_info(self, command,
                      indent=0, prefix='', color=None,
                      help=False, app=None, choices=None):
     if choices is None:
         choices = self._choices_by_group(app)
     meta = choices[command]
     if help:
         help = '|' + text.indent(meta.help, indent + 4)
     else:
         help = None
     return text.join([
         '|' + text.indent('{0}{1} {2}'.format(
             prefix, color(command), meta.signature or ''), indent),
         help,
     ])
开发者ID:SUNNYWILLHAPPEN,项目名称:celery,代码行数:15,代码来源:celery.py


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