![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|
Public Member Functions | |
| None | __init__ (self, str url, PipSession session, int chunk_size=CONTENT_CHUNK_SIZE) |
| str | mode (self) |
| str | name (self) |
| bool | seekable (self) |
| None | close (self) |
| bool | closed (self) |
| bytes | read (self, int size=-1) |
| bool | readable (self) |
| int | seek (self, int offset, int whence=0) |
| int | tell (self) |
| int | truncate (self, Optional[int] size=None) |
| bool | writable (self) |
| "LazyZipOverHTTP" | __enter__ (self) |
| None | __exit__ (self, *Any exc) |
Protected Member Functions | |
| Generator[None, None, None] | _stay (self) |
| None | _check_zip (self) |
| Response | _stream_response (self, int start, int end, Dict[str, str] base_headers=HEADERS) |
| Generator[Tuple[int, int], None, None] | _merge (self, int start, int end, int left, int right) |
| None | _download (self, int start, int end) |
Protected Attributes | |
| _session | |
| _url | |
| _chunk_size | |
| _length | |
| _file | |
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.
|
protected |
Check and download until the file is a valid ZIP.
|
protected |
Download bytes from start to end inclusively.
|
protected |
Return a generator of intervals to be fetched.
Args:
start (int): Start of needed interval
end (int): End of needed interval
left (int): Index of first overlapping downloaded data
right (int): Index after last overlapping downloaded data
|
protected |
Return a context manager keeping the position. At the end of the block, seek back to original position.
|
protected |
Return HTTP response to a range request from start to end.
| None pip._internal.network.lazy_wheel.LazyZipOverHTTP.close | ( | self | ) |
Close the file.
| bool pip._internal.network.lazy_wheel.LazyZipOverHTTP.closed | ( | self | ) |
Whether the file is closed.
| str pip._internal.network.lazy_wheel.LazyZipOverHTTP.mode | ( | self | ) |
Opening mode, which is always rb.
| str pip._internal.network.lazy_wheel.LazyZipOverHTTP.name | ( | self | ) |
Path to the underlying file.
| bytes pip._internal.network.lazy_wheel.LazyZipOverHTTP.read | ( | self, | |
| int | 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.
| bool pip._internal.network.lazy_wheel.LazyZipOverHTTP.readable | ( | self | ) |
Return whether the file is readable, which is True.
| int pip._internal.network.lazy_wheel.LazyZipOverHTTP.seek | ( | self, | |
| int | offset, | ||
| int | 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.
| bool pip._internal.network.lazy_wheel.LazyZipOverHTTP.seekable | ( | self | ) |
Return whether random access is supported, which is True.
| int pip._internal.network.lazy_wheel.LazyZipOverHTTP.tell | ( | self | ) |
Return the current position.
| int pip._internal.network.lazy_wheel.LazyZipOverHTTP.truncate | ( | self, | |
| Optional[int] | 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.
| bool pip._internal.network.lazy_wheel.LazyZipOverHTTP.writable | ( | self | ) |
Return False.