@staticmethod
    def pack(value):
        if not isinstance(value, str):
            raise ValueError, "value not a string: %s" % value
        if len(value) < 256:
            hdrsiz = CoreTlv.hdrsiz
        else:
            hdrsiz = CoreTlv.longhdrsiz
        padlen = -(hdrsiz + len(value)) % 4
        return len(value), value + '\0' * padlen
dataset/ETHPy150Open coreemu/core/daemon/core/api/coreapi.py/CoreTlvDataString.pack/original