findstatic.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:tissuelab 作者: VirtualPlants 项目源码 文件源码
def handle_label(self, path, **options):
        verbosity = int(options.get('verbosity', 1))
        result = finders.find(path, all=options['all'])
        path = force_text(path)
        if result:
            if not isinstance(result, (list, tuple)):
                result = [result]
            result = (force_text(os.path.realpath(path)) for path in result)
            if verbosity >= 1:
                output = '\n  '.join(result)
                return "Found '%s' here:\n  %s" % (path, output)
            else:
                return '\n'.join(result)
        else:
            if verbosity >= 1:
                self.stderr.write("No matching file found for '%s'." % path)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号