python类__init__()的实例源码

__init__.py 文件源码 项目:deb-python-couleur 作者: openstack 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def __init__(self, output=None, indent=2, linebreak=False, bold=False,
                 disabled=not SUPPORTS_ANSI):
        self._indentation_factor = indent
        self._indent = 0
        self._linebreak = linebreak
        self._bold = bold
        self._in_format = False
        self._disabled = disabled
        self.output = output or sys.stdout

        if disabled:
            self._backcolors = empty()
            self._forecolors = empty()
            self._modifiers = empty()
        else:
            self._backcolors = backcolors()
            self._forecolors = forecolors()
            self._modifiers = modifiers()
__init__.py 文件源码 项目:deb-python-couleur 作者: openstack 项目源码 文件源码 阅读 15 收藏 0 点赞 0 评论 0
def __init__(self, delimiter=delimiters.DEFAULT):
        self.delimiter = delimiter
        StringIO.__init__(self)
__init__.py 文件源码 项目:deb-python-couleur 作者: openstack 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def __init__(self, output, delimiter=delimiters.DEFAULT):
        self.old_write = output.write
        self.delimiter = delimiter

        if output is sys.__stdout__:
            output = StdOutMocker(delimiter)

        elif output is sys.__stderr__:
            output = StdErrMocker(delimiter)

        self.output = output
ImageFileIO.py 文件源码 项目:CNCGToolKit 作者: cineuse 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def __init__(self, fp):
        data = fp.read()
        StringIO.__init__(self, data)
utils.py 文件源码 项目:chaquopy 作者: chaquo 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def __init__(self, obj, method):
        StringIO.__init__(self)
        self.func = getattr(obj, method)
ImageFileIO.py 文件源码 项目:InstagramPosting 作者: LeviParadis 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def __init__(self, fp):
        data = fp.read()
        StringIO.__init__(self, data)
ImageFileIO.py 文件源码 项目:ngx_status 作者: YoYoAdorkable 项目源码 文件源码 阅读 17 收藏 0 点赞 0 评论 0
def __init__(self, fp):
        data = fp.read()
        StringIO.__init__(self, data)


问题


面经


文章

微信
公众号

扫码关注公众号