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


Python Filter.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from pygments.filter import Filter [as 别名]
# 或者: from pygments.filter.Filter import __init__ [as 别名]
def __init__(self, **options):
        Filter.__init__(self, **options)
        for name, default in [('spaces',   u'·'),
                              ('tabs',     u'»'),
                              ('newlines', u'¶')]:
            opt = options.get(name, False)
            if isinstance(opt, string_types) and len(opt) == 1:
                setattr(self, name, opt)
            else:
                setattr(self, name, (opt and default or ''))
        tabsize = get_int_opt(options, 'tabsize', 8)
        if self.tabs:
            self.tabs += ' ' * (tabsize - 1)
        if self.newlines:
            self.newlines += '\n'
        self.wstt = get_bool_opt(options, 'wstokentype', True) 
开发者ID:joxeankoret,项目名称:pigaios,代码行数:18,代码来源:__init__.py

示例2: __init__

# 需要导入模块: from pygments.filter import Filter [as 别名]
# 或者: from pygments.filter.Filter import __init__ [as 别名]
def __init__(self,
                 vm,
                 path_dex2jar="./decompiler/dex2jar/",
                 bin_dex2jar="dex2jar.sh",
                 tmp_dir="/tmp/"):
        pathtmp = tmp_dir
        if not os.path.exists(pathtmp):
            os.makedirs(pathtmp)

        fd, fdname = tempfile.mkstemp(dir=pathtmp)
        with os.fdopen(fd, "w+b") as fd:
            fd.write(vm.get_buff())
            fd.flush()

        compile = Popen([path_dex2jar + bin_dex2jar, fdname],
                        stdout=PIPE,
                        stderr=STDOUT)
        stdout, stderr = compile.communicate()
        os.unlink(fdname)

        self.jarfile = fdname + "_dex2jar.jar" 
开发者ID:xtiankisutsa,项目名称:MARA_Framework,代码行数:23,代码来源:decompiler.py

示例3: __init__

# 需要导入模块: from pygments.filter import Filter [as 别名]
# 或者: from pygments.filter.Filter import __init__ [as 别名]
def __init__(self, **options):
        Filter.__init__(self, **options)
        for name, default in [('spaces',   u'·'),
                              ('tabs',     u'»'),
                              ('newlines', u'¶')]:
            opt = options.get(name, False)
            if isinstance(opt, str) and len(opt) == 1:
                setattr(self, name, opt)
            else:
                setattr(self, name, (opt and default or ''))
        tabsize = get_int_opt(options, 'tabsize', 8)
        if self.tabs:
            self.tabs += ' ' * (tabsize - 1)
        if self.newlines:
            self.newlines += '\n'
        self.wstt = get_bool_opt(options, 'wstokentype', True) 
开发者ID:V1EngineeringInc,项目名称:V1EngineeringInc-Docs,代码行数:18,代码来源:__init__.py

示例4: __init__

# 需要导入模块: from pygments.filter import Filter [as 别名]
# 或者: from pygments.filter.Filter import __init__ [as 别名]
def __init__(self, **options):
        """
        Filter Method Code from a whole class

        :param options:
        """
        Filter.__init__(self, **options)

        self.method_name = options["method_name"]
        # self.descriptor = options["descriptor"]

        self.present = False
        self.get_desc = True  # False 
开发者ID:amimo,项目名称:dcc,代码行数:15,代码来源:decompiler.py

示例5: __init__

# 需要导入模块: from pygments.filter import Filter [as 别名]
# 或者: from pygments.filter.Filter import __init__ [as 别名]
def __init__(self, **options):
        Filter.__init__(self, **options)
        self.prefix = options.get("prefix") 
开发者ID:hyperledger,项目名称:aries-cloudagent-python,代码行数:5,代码来源:utils.py

示例6: __init__

# 需要导入模块: from pygments.filter import Filter [as 别名]
# 或者: from pygments.filter.Filter import __init__ [as 别名]
def __init__(self, vm, path_dex2jar="./decompiler/dex2jar/", bin_dex2jar="dex2jar.sh", tmp_dir="/tmp/"):
        pathtmp = tmp_dir
        if not os.path.exists(pathtmp):
            os.makedirs(pathtmp)

        fd, fdname = tempfile.mkstemp(dir=pathtmp)
        with os.fdopen(fd, "w+b") as fd:
            fd.write(vm.get_buff())
            fd.flush()

        compile = Popen([path_dex2jar + bin_dex2jar, fdname], stdout=PIPE, stderr=STDOUT)
        stdout, stderr = compile.communicate()
        os.unlink(fdname)

        self.jarfile = fdname + "_dex2jar.jar" 
开发者ID:DroidTest,项目名称:TimeMachine,代码行数:17,代码来源:decompiler.py


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