本文整理汇总了Python中Peach.transformer.Transformer类的典型用法代码示例。如果您正苦于以下问题:Python Transformer类的具体用法?Python Transformer怎么用?Python Transformer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Transformer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, salt=None):
"""
:param salt: salt for crypt (optional)
:type salt: str
"""
Transformer.__init__(self)
self._salt = salt
示例2: __init__
def __init__(self, salt = None):
'''
@type salt: string
@param salt: Salt for crypt (optional)
'''
Transformer.__init__(self)
self._salt = salt
示例3: __init__
def __init__(self, asHex=0):
"""
@param asHex: 1 is hex, 0 is binary
@type asHex: int
"""
Transformer.__init__(self)
self._asHex = asHex
示例4: __init__
def __init__(self, packFormat):
"""Create a Pack transformer.
packFormat is a standard pack format string. Format string should only
contain a single data place holder.
"""
Transformer.__init__(self)
self._packFormat = packFormat
示例5: __init__
def __init__(self, withPrefix=0):
"""Create IntToHex object.
withPrefix flag indicates if 0x prefix should be tagged onto string.
Default is no.
"""
Transformer.__init__(self)
self._withPrefix = withPrefix
示例6: __init__
def __init__(self, anotherTransformer=None):
"""Create Transformer object.
:param anotherTransformer: a transformer to run next
:type anotherTransformer: Transformer
"""
Transformer.__init__(self, anotherTransformer)
示例7: __init__
def __init__(self, level = 9):
'''
@type level: number
@param level: The compresslevel parameter, if given, must be a number
between 1 and 9; the default is 9.
'''
Transformer.__init__(self)
self._level = level
示例8: __init__
def __init__(self, anotherTransformer = None):
'''
Create Transformer object.
@type anotherTransformer: Transformer
@param anotherTransformer: A transformer to run next
'''
Transformer.__init__(self, anotherTransformer)
示例9: __init__
def __init__(self, isSigned=1, isLittleEndian=1):
"""
@param isSigned: 1 for signed, 0 for unsigned (we ignore this)
@type isSigned: number
@param isLittleEndian: 1 for signed, 0 for unsigned
@type isLittleEndian: number
"""
Transformer.__init__(self)
self._isLittleEndian = isLittleEndian
示例10: __init__
def __init__(self, anotherTransformer=None, pad=True):
"""Create Transformer object.
:param anotherTransformer: A transformer to run next
:type anotherTransformer: Transformer
:param pad: will pad / trim encoded name to 32 bytes
:type pad: bool
"""
Transformer.__init__(self, anotherTransformer)
self._pad = pad
示例11: __init__
def __init__(self, isSigned = 1, isLittleEndian = 1):
'''
@type isSigned: number
@param isSigned: 1 for signed, 0 for unsigned
@type isLittleEndian: number
@param isLittleEndian: 1 for signed, 0 for unsigned
'''
Transformer.__init__(self)
self._isSigned = isSigned
self._isLittleEndian = isLittleEndian
示例12: __init__
def __init__(self, anotherTransformer=None, resolution=None, prefix=None):
"""Create Transformer object.
:param anotherTransformer: a transformer to run next
:type anotherTransformer: Transformer
:param resolution: number of nibbles between separator
(must be a positive even integer)
:type resolution: int
:param prefix: a value to prepend each chunk with (defaults to ' ')
:type prefix: str
"""
Transformer.__init__(self, anotherTransformer)
self._resolution = resolution
self._prefix = prefix
示例13: __init__
def __init__(self, key, digestmod=hashlib.md5, asHex=0):
"""
Key is a generator for HMAC key, digestmod is hash to use (md5 or sha)
:param key: HMAC key
:type key: Generator
:param digestmod: which digest to use
:type digestmod: MD5 or SHA hashlib object
:param asHex: 1 is hex, 0 is binary
:type asHex: int
"""
Transformer.__init__(self)
self._key = key
self._digestmod = digestmod
self._asHex = asHex
示例14: __init__
def __init__(self):
Transformer.__init__(self)
self._size = None
示例15: __init__
def __init__(self, level=-1, dicto=None):
Transformer.__init__(self)
self._level = level
self._dicto = dicto