Module pychrysalide.common
Documentation
Python module for Chrysalide.common
Classes
Class bitfield
Python object for bitfield_t.
Hierarchy
builtins.object ╰── pychrysalide.common.bitfield
Methods
__and__(self, value)
Return self&value.
__eq__(self, value)
Return self==value.
__ge__(self, value)
Return self>=value.
__getitem__(self, key)
Return self[key].
__gt__(self, value)
Return self>value.
__le__(self, value)
Return self<=value.
__len__(self)
Return len(self).
__lt__(self, value)
Return self
__ne__(self, value)
Return self!=value.
__or__(self, value)
Return self|value.
__rand__(self, value)
Return value&self.
__ror__(self, value)
Return value|self.
dup(self)
Duplicate a bitfield.
reset(self, first, count)
Switch to 0 a part of bits in a bitfield.
reset_all(self)
Switch to 0 all bits in a bitfield.
set(self, first, count)
Switch to 1 a part of bits in a bitfield.
set_all(self)
Switch to 1 all bits in a bitfield.
test(self, n)
Test if a given bit is set in a bitfield.
test_all(self, first, count)
Test a range of bits to 1.
test_none(self, first, count)
Test a range of bits to 0.
Attributes
popcount
Get the number of bits set to 1 in the bitfield.
size
Provide the size of the bitfield.
Data
__hash__ = None
Class fnv1a
Python version for Chrysalide of the Fowler-Noll-Vo hash function.
Hierarchy
builtins.object ╰── pychrysalide.core.fnv1a
Methods
hash(str)
Compute the FNV-1a hash from a given string.
Class pathname
Path manipulations in Python for Chrysalide.
Hierarchy
builtins.object ╰── pychrysalide.core.pathname
Methods
build_absolute_filename(ref, target)
Compute the absolute path for a file.
build_relative_filename(ref, target)
Compute the relative path between two files.