gwcelery.util module¶
Miscellaneous utilities that are useful inside many different tasks.
-
gwcelery.util.
NamedTemporaryFile
(content=None, **kwargs)[source]¶ Convenience wrapper for
tempfile.NamedTemporaryFile()
that writes some data to the file before handing it to the calling code.Parameters: - content (str, bytes, None) – Initial contents of the file.
- **kwargs – Additional keyword arguments to pass to
tempfile.NamedTemporaryFile()
.