• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(49)  |  Call(9)  |  Derive(0)  |  Import(40)
No Document.

src/t/y/typedbytes-HEAD/typedbytes.py   typedbytes(Download)
def classes():
 
    from cPickle import dumps, loads, UnpicklingError, HIGHEST_PROTOCOL
    from struct import pack, unpack, error as StructError
    try:
        from struct import Struct
    except ImportError:
        def read_bytes(self):
            count = unpack_int(self.file.read(4))[0]
            value = self.file.read(count)
            if _len(value) != count:
                raise StructError("EOF before reading all of bytes type")
            return value
 
        def read_string(self):
            count = unpack_int(self.file.read(4))[0]
            value = self.file.read(count)
            if _len(value) != count:
                raise StructError("EOF before reading all of string")
            return value
 
        read_bytestring = read_string
 
        def read_unicode(self):
            count = unpack_int(self.file.read(4))[0]
            value = self.file.read(count)
            if _len(value) != count:
                raise StructError("EOF before reading all of string")
        def read_vector(self):
            r = self._read
            count = unpack_int(self.file.read(4))[0]
            try:
                return tuple(r() for i in xrange(count))
            except StopIteration:
                raise StructError("EOF before all vector elements read")
 
        def read_list(self):
            value = list(self._reads())
            if self.eof:
                raise StructError("EOF before end-of-list marker")
        def read_pickle(self):
            count = unpack_int(self.file.read(4))[0]
            bytes = self.file.read(count)
            if _len(bytes) != count:
                raise StructError("EOF before reading all of bytes type")
            return loads(bytes)
 
        def read_marker(self):
            raise StopIteration
 
        def invalid_typecode(self):
            raise StructError("Invalid type byte: " + str(self.t))
            try:
                value = self._read()
            except StopIteration:
                raise StructError('EOF before second item in pair')
            return key, value
 
        def reads(self):
                try:
                    value = next()
                except StopIteration:
                    raise StructError('EOF before second item in pair')
                yield key, value
 
        __iter__ = reads

src/p/4/p4a.audio-1.1rc1/p4a/audio/ogg/thirdparty/mutagen/_util.py   p4a.audio(Download)
class cdata(object):
    """C character buffer to Python numeric type conversions."""
 
    from struct import error
 
    short_le = staticmethod(lambda data: struct.unpack('<h', data)[0])
    ushort_le = staticmethod(lambda data: struct.unpack('<H', data)[0])

src/f/i/file-folder-ren-HEAD/metamorphose2/trunk/src/mutagen/_util.py   file-folder-ren(Download)
class cdata(object):
    """C character buffer to Python numeric type conversions."""
 
    from struct import error
 
    short_le = staticmethod(lambda data: struct.unpack('<h', data)[0])
    ushort_le = staticmethod(lambda data: struct.unpack('<H', data)[0])

src/m/u/mutagen-HEAD/mutagen/_util.py   mutagen(Download)
class cdata(object):
    """C character buffer to Python numeric type conversions."""
 
    from struct import error
 
    short_le = staticmethod(lambda data: struct.unpack('<h', data)[0])
    ushort_le = staticmethod(lambda data: struct.unpack('<H', data)[0])

src/s/t/stylus2x-HEAD/trunk/src/mutagen/_util.py   stylus2x(Download)
class cdata(object):
    """C character buffer to Python numeric type conversions."""
 
    from struct import error
 
    short_le = staticmethod(lambda data: struct.unpack('<h', data)[0])
    ushort_le = staticmethod(lambda data: struct.unpack('<H', data)[0])

src/f/i/file-folder-ren-HEAD/metamorphose2/src/mutagen/_util.py   file-folder-ren(Download)
class cdata(object):
    """C character buffer to Python numeric type conversions."""
 
    from struct import error
 
    short_le = staticmethod(lambda data: struct.unpack('<h', data)[0])
    ushort_le = staticmethod(lambda data: struct.unpack('<H', data)[0])

src/t/a/tangodj-HEAD/Milonga_windows/mutagen/_util.py   tangodj(Download)
class cdata(object):
    """C character buffer to Python numeric type conversions."""
 
    from struct import error
 
    short_le = staticmethod(lambda data: struct.unpack('<h', data)[0])
    ushort_le = staticmethod(lambda data: struct.unpack('<H', data)[0])

src/t/a/tangodj-HEAD/Milonga_linux/mutagen/_util.py   tangodj(Download)
class cdata(object):
    """C character buffer to Python numeric type conversions."""
 
    from struct import error
 
    short_le = staticmethod(lambda data: struct.unpack('<h', data)[0])
    ushort_le = staticmethod(lambda data: struct.unpack('<H', data)[0])

src/p/i/pilgrim-HEAD/pilgrim/codecs/blp.py   pilgrim(Download)
"""
 
from PIL import Image, ImageFile
from struct import pack, unpack, error as StructError
from cStringIO import StringIO
 
from . import JPEG

src/p/e/pendrell-0.3.3/lib/decoders.py   pendrell(Download)
from codecs import getincrementaldecoder as _getincrementaldecoder
from struct import calcsize, unpack, unpack_from, error as UnpackError
import gzip, zlib
 
from twisted.python import log, urlpath, util
 
from pendrell import log

  1 | 2 | 3 | 4  Next