Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
pip._vendor.cachecontrol.filewrapper.CallbackFileWrapper Class Reference

Public Member Functions

None __init__ (self, HTTPResponse fp, Callable[[bytes], None]|None callback)
 
Any __getattr__ (self, str name)
 
bytes read (self, int|None amt=None)
 

Protected Member Functions

None _close (self)
 
bytes _safe_read (self, int amt)
 

Detailed Description

Small wrapper around a fp object which will tee everything read into a
buffer, and when that file is closed it will execute a callback with the
contents of that buffer.

All attributes are proxied to the underlying file object.

This class uses members with a double underscore (__) leading prefix so as
not to accidentally shadow an attribute.

The data is stored in a temporary file until it is all available.  As long
as the temporary files directory is disk-based (sometimes it's a
memory-backed-``tmpfs`` on Linux), data will be unloaded to disk if memory
pressure is high.  For small files the disk usually won't be used at all,
it'll all be in the filesystem memory cache, so there should be no
performance impact.

The documentation for this class was generated from the following file: