Did I find the right examples for you? yes no

All Samples(342)  |  Call(342)  |  Derive(0)  |  Import(0)
Return the file's current position.

src/a/s/astral-HEAD/examples/webcam_and_rtmp/amf.py   astral(Download)
    def eof(self): return self.tell() >= self.len  # return true if next read will cause EOFError
    def remaining(self): return self.len - self.tell() # return number of remaining bytes
 
    def read(self, length=-1):
        if length > 0 and self.eof(): raise EOFError # raise error if reading beyond EOF
        if length > 0 and self.tell() + length > self.len: length = self.len - self.tell() # don't read more than available bytes

src/p/y/python-saml-HEAD/example.py   python-saml(Download)
    def _serve_msg(self, code, msg):
        f = StringIO()
        f.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">')
        f.write("<html>\n<body>\n%s</body>\n</html>\n" % msg)
        length = f.tell()

src/a/s/astral-HEAD/astral/rtmp/amf.py   astral(Download)
    def eof(self): return self.tell() >= self.len  # return true if next read will cause EOFError
    def remaining(self): return self.len - self.tell() # return number of remaining bytes
 
    def read(self, length=-1):
        if length > 0 and self.eof(): raise EOFError # raise error if reading beyond EOF
        if length > 0 and self.tell() + length > self.len: length = self.len - self.tell() # don't read more than available bytes

src/r/t/rtmplite-HEAD/amf.py   rtmplite(Download)
    def eof(self): return self.tell() >= self.len  # return true if next read will cause EOFError
    def remaining(self): return self.len - self.tell() # return number of remaining bytes
 
    def read(self, length=-1):
        if length > 0 and self.eof(): raise EOFError # raise error if reading beyond EOF
        if length > 0 and self.tell() + length > self.len: length = self.len - self.tell() # don't read more than available bytes

src/c/a/cauliflower-HEAD/cauliflower/meta.py   cauliflower(Download)
    def tell(self):
        rv = StringIO.tell(self)
        if rv % 2:
            raise Exception("Offset %d is odd!" % rv)
        return rv // 2

src/m/a/magnetodb-2.0.2/magnetodb/common/cassandra/io/geventreactor.py   magnetodb(Download)
                    return # leave the read loop
 
            if self._iobuf.tell():
                while True:
                    pos = self._iobuf.tell()
                        # seek to end to get length of current buffer
                        self._iobuf.seek(0, os.SEEK_END)
                        pos = self._iobuf.tell()
 
                        if pos >= body_len + 8:

src/d/i/digsby-HEAD/digsby/src/digsby/digsbyrsa.py   digsby(Download)
    to_ = StringIO()
    from_ = StringIO(from_)
    while (from_.tell() < from_.len):
        to_.write(rsa.public_encrypt(from_.read(blocksize), padding))
    return to_.getvalue()
    to_ = StringIO()
    from_ = StringIO(from_)
    while (from_.tell() < from_.len):
        to_.write(rsa.private_encrypt(from_.read(blocksize), padding))
    return to_.getvalue()
    to_ = StringIO()
    from_ = StringIO(from_)
    while (from_.tell() < from_.len):
        to_.write(rsa.private_decrypt(from_.read(blocksize), padding))
    return to_.getvalue()
    to_ = StringIO()
    from_ = StringIO(from_)
    while (from_.tell() < from_.len):
        to_.write(rsa.public_decrypt(from_.read(blocksize), padding))
    return to_.getvalue()

src/o/b/obspy-0.9.0/obspy/xseed/blockette/blockette041.py   obspy(Download)
            data = StringIO(data)
        # get current lookup key
        pos = data.tell()
        data.read(7)
        global_lookup_key = int(data.read(4))
        while True:
            # save position
            pos = data.tell()
            try:
                blockette_id = int(data.read(3))
            self.fields[5].read(data)
            # remaining length in current blockette
            length = pos - data.tell() + blockette_length
            # read follow up blockette and append it to temporary blockette
            temp.write(data.read(length))

src/c/a/cassandra-driver-1.1.1/cassandra/io/libevreactor.py   cassandra-driver(Download)
                return
 
        if self._iobuf.tell():
            while True:
                pos = self._iobuf.tell()
                    # seek to end to get length of current buffer
                    self._iobuf.seek(0, os.SEEK_END)
                    pos = self._iobuf.tell()
 
                    if pos >= body_len + 8:

src/c/a/cassandra-driver-1.1.1/cassandra/io/geventreactor.py   cassandra-driver(Download)
                    return  # leave the read loop
 
            if self._iobuf.tell():
                while True:
                    pos = self._iobuf.tell()
                        # seek to end to get length of current buffer
                        self._iobuf.seek(0, os.SEEK_END)
                        pos = self._iobuf.tell()
 
                        if pos >= body_len + 8:

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next