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


Python pyasn1.__version__方法代码示例

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


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

示例1: __init__

# 需要导入模块: import pyasn1 [as 别名]
# 或者: from pyasn1 import __version__ [as 别名]
def __init__(self, *flags, **options):
        self._flags = flagNone
        if options.get('printer') is not None:
            self._printer = options.get('printer')
        elif self.defaultPrinter is not None:
            self._printer = self.defaultPrinter
        if 'loggerName' in options: 
            # route our logs to parent logger
            self._printer = Printer(
                logger=logging.getLogger(options['loggerName']),
                handler=NullHandler()
            )
        else:
            self._printer = Printer()
        self('running pyasn1 version %s' % __version__)
        for f in flags:
            inverse = f and f[0] in ('!', '~')
            if inverse:
                f = f[1:]
            try:
                if inverse:
                    self._flags &= ~flagMap[f]
                else:
                    self._flags |= flagMap[f]
            except KeyError:
                raise error.PyAsn1Error('bad debug flag %s' % f)
  
            self('debug category \'%s\' %s' % (f, inverse and 'disabled' or 'enabled')) 
开发者ID:aliyun,项目名称:oss-ftp,代码行数:30,代码来源:debug.py

示例2: __init__

# 需要导入模块: import pyasn1 [as 别名]
# 或者: from pyasn1 import __version__ [as 别名]
def __init__(self, *flags, **options):
        self._flags = flagNone
        if options.get('printer') is not None:
            self._printer = options.get('printer')
        elif self.defaultPrinter is not None:
            self._printer = self.defaultPrinter
        if 'loggerName' in options:
            # route our logs to parent logger
            self._printer = Printer(
                logger=logging.getLogger(options['loggerName']),
                handler=NullHandler()
            )
        else:
            self._printer = Printer()
        self('running pyasn1 version %s' % __version__)
        for f in flags:
            inverse = f and f[0] in ('!', '~')
            if inverse:
                f = f[1:]
            try:
                if inverse:
                    self._flags &= ~flagMap[f]
                else:
                    self._flags |= flagMap[f]
            except KeyError:
                raise error.PyAsn1Error('bad debug flag %s' % f)

            self('debug category \'%s\' %s' % (f, inverse and 'disabled' or 'enabled')) 
开发者ID:proxysh,项目名称:Safejumper-for-Desktop,代码行数:30,代码来源:debug.py

示例3: __init__

# 需要导入模块: import pyasn1 [as 别名]
# 或者: from pyasn1 import __version__ [as 别名]
def __init__(self, *flags, **options):
        self._flags = flagNone

        if 'loggerName' in options:
            # route our logs to parent logger
            self._printer = Printer(
                logger=logging.getLogger(options['loggerName']),
                handler=NullHandler()
            )

        elif 'printer' in options:
            self._printer = options.get('printer')

        else:
            self._printer = self.defaultPrinter

        self._printer('running pyasn1 %s, debug flags %s' % (__version__, ', '.join(flags)))

        for flag in flags:
            inverse = flag and flag[0] in ('!', '~')
            if inverse:
                flag = flag[1:]
            try:
                if inverse:
                    self._flags &= ~flagMap[flag]
                else:
                    self._flags |= flagMap[flag]
            except KeyError:
                raise error.PyAsn1Error('bad debug flag %s' % flag)

            self._printer("debug category '%s' %s" % (flag, inverse and 'disabled' or 'enabled')) 
开发者ID:tp4a,项目名称:teleport,代码行数:33,代码来源:debug.py

示例4: __init__

# 需要导入模块: import pyasn1 [as 别名]
# 或者: from pyasn1 import __version__ [as 别名]
def __init__(self, *flags, **options):
        self._flags = DEBUG_NONE

        if 'loggerName' in options:
            # route our logs to parent logger
            self._printer = Printer(
                logger=logging.getLogger(options['loggerName']),
                handler=NullHandler()
            )

        elif 'printer' in options:
            self._printer = options.get('printer')

        else:
            self._printer = self.defaultPrinter

        self._printer('running pyasn1 %s, debug flags %s' % (__version__, ', '.join(flags)))

        for flag in flags:
            inverse = flag and flag[0] in ('!', '~')
            if inverse:
                flag = flag[1:]
            try:
                if inverse:
                    self._flags &= ~FLAG_MAP[flag]
                else:
                    self._flags |= FLAG_MAP[flag]
            except KeyError:
                raise error.PyAsn1Error('bad debug flag %s' % flag)

            self._printer("debug category '%s' %s" % (flag, inverse and 'disabled' or 'enabled')) 
开发者ID:tp4a,项目名称:teleport,代码行数:33,代码来源:debug.py

示例5: __init__

# 需要导入模块: import pyasn1 [as 别名]
# 或者: from pyasn1 import __version__ [as 别名]
def __init__(self, *flags):
        self._flags = flagNone
        self._printer = self.defaultPrinter
        self('running pyasn1 version %s' % __version__)
        for f in flags:
            if f not in flagMap:
                raise error.PyAsn1Error('bad debug flag %s' % (f,))
            self._flags = self._flags | flagMap[f]
            self('debug category \'%s\' enabled' % f) 
开发者ID:caronc,项目名称:nzb-subliminal,代码行数:11,代码来源:debug.py


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