pyrax
Python Bindings for the Rackspace Cloud
|
Convenience class for dealing with temporary files. More...
Public Member Functions | |
def | __enter__ |
def | __exit__ |
Static Public Attributes | |
name = None |
Convenience class for dealing with temporary files.
The temp file is created in a secure fashion, and is automatically deleted when the context manager exits.
Usage:
with SelfDeletingTempfile() as tmp: tmp.write( ... ) some_func(tmp) # More code # At this point, the tempfile has been erased.
def __enter__ | ( | self | ) |
def __exit__ | ( | self, | |
type, | |||
value, | |||
traceback | |||
) |
name = None [static] |