Did I find the right examples for you? yes no

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)

src/l/i/livestreamer-1.8.0/src/livestreamer/packages/flashmedia/types.py   livestreamer(Download)
from .compat import OrderedDict, is_py2, str, bytes, integer_types, string_types
from .util import pack_bytes_into
 
from collections import namedtuple
from struct import Struct, error as struct_error
    def pack_into(self, buf, offset, val):
        rval = bytes(val[:self.size], "ascii")
        offset = pack_bytes_into(buf, offset, rval)
 
        if len(rval) < self.size:
            paddinglen = self.size - len(rval)
            offset = pack_bytes_into(buf, offset, self.padding * paddinglen)
    def pack_into(cls, buf, offset, val,
                  encoding="utf8", errors="ignore"):
 
        return pack_bytes_into(buf, offset,
                               val.encode(encoding, errors))

src/l/i/livestreamer-HEAD/src/livestreamer/packages/flashmedia/types.py   livestreamer(Download)
from .compat import OrderedDict, is_py2, str, bytes, integer_types, string_types
from .util import pack_bytes_into
 
from collections import namedtuple
from struct import Struct, error as struct_error
    def pack_into(self, buf, offset, val):
        rval = bytes(val[:self.size], "ascii")
        offset = pack_bytes_into(buf, offset, rval)
 
        if len(rval) < self.size:
            paddinglen = self.size - len(rval)
            offset = pack_bytes_into(buf, offset, self.padding * paddinglen)
    def pack_into(cls, buf, offset, val,
                  encoding="utf8", errors="ignore"):
 
        return pack_bytes_into(buf, offset,
                               val.encode(encoding, errors))