pyrax
Python Bindings for the Rackspace Cloud
 All Classes Namespaces Files Functions Variables Properties
Public Member Functions | Static Public Attributes
SelfDeletingTempfile Class Reference

Convenience class for dealing with temporary files. More...

List of all members.

Public Member Functions

def __enter__
def __exit__

Static Public Attributes

 name = None

Detailed Description

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.

Member Function Documentation

def __enter__ (   self)
def __exit__ (   self,
  type,
  value,
  traceback 
)

Member Data Documentation

name = None [static]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Properties