Staging: this is not the live site, pydocs.org.
File and Directory Access
Temporary file wrapper, specialized to switch from BytesIO
or StringIO to a real file when it exceeds a certain size or
when a fileno is needed.
Changed in 3.3, 3.8, 3.11
- 3.3: the truncate method now accepts a size argument.
- 3.8: Added errors parameter.
- 3.11: Fully implements the io.BufferedIOBase and io.TextIOBase abstract base classes (depending on whether binary or text mode was specified).
Members of SpooledTemporaryFile
r
- rollover
- The resulting file has one additional method, rollover(), which causes the file to roll over to an on-disk file regardless of its size.