OpenQuizz
Une application de gestion des contenus pédagogiques
|
Public Member Functions | |
def | __init__ (self, url, session, chunk_size=CONTENT_CHUNK_SIZE) |
def | mode (self) |
def | name (self) |
def | seekable (self) |
def | close (self) |
def | closed (self) |
def | read (self, size=-1) |
def | readable (self) |
def | seek (self, offset, whence=0) |
def | tell (self) |
def | truncate (self, size=None) |
def | writable (self) |
def | __enter__ (self) |
def | __exit__ (self, *exc) |
File-like object mapped to a ZIP file over HTTP. This uses HTTP range requests to lazily fetch the file's content, which is supposed to be fed to ZipFile. If such requests are not supported by the server, raise HTTPRangeRequestUnsupported during initialization.
def __init__ | ( | self, | |
url, | |||
session, | |||
chunk_size = CONTENT_CHUNK_SIZE |
|||
) |
def __enter__ | ( | self | ) |
def __exit__ | ( | self, | |
* | exc | ||
) |
def close | ( | self | ) |
Close the file.
def closed | ( | self | ) |
Whether the file is closed.
def mode | ( | self | ) |
Opening mode, which is always rb.
def name | ( | self | ) |
Path to the underlying file.
def read | ( | self, | |
size = -1 |
|||
) |
Read up to size bytes from the object and return them. As a convenience, if size is unspecified or -1, all bytes until EOF are returned. Fewer than size bytes may be returned if EOF is reached.
def readable | ( | self | ) |
Return whether the file is readable, which is True.
def seek | ( | self, | |
offset, | |||
whence = 0 |
|||
) |
Change stream position and return the new absolute position. Seek to offset relative position indicated by whence: * 0: Start of stream (the default). pos should be >= 0; * 1: Current position - pos may be negative; * 2: End of stream - pos usually negative.
def seekable | ( | self | ) |
Return whether random access is supported, which is True.
def tell | ( | self | ) |
Return the current possition.
def truncate | ( | self, | |
size = None |
|||
) |
Resize the stream to the given size in bytes. If size is unspecified resize to the current position. The current stream position isn't changed. Return the new file size.
def writable | ( | self | ) |
Return False.