Gaudi Framework, version v21r8

Home   Generated: 17 Mar 2010

validate_patch::TempDir Class Reference

List of all members.

Public Member Functions

def __init__
def getName
def __str__
def __del__

Private Attributes

 _keep_var
 _name


Detailed Description

Class to create a temporary directory.

Definition at line 111 of file validate_patch.py.


Member Function Documentation

def validate_patch::TempDir::__init__ (   self,
  suffix = "",
  prefix = "tmp",
  dir = None,
  keep_var = "KEEPTEMPDIR" 
)

Constructor.

'keep_var' is used to define which environment variable will prevent the
deletion of the directory.

The other arguments are the same as tempfile.mkdtemp.

Definition at line 113 of file validate_patch.py.

00113                                                                                  :
00114         """Constructor.
00115         
00116         'keep_var' is used to define which environment variable will prevent the
00117         deletion of the directory.
00118         
00119         The other arguments are the same as tempfile.mkdtemp.
00120         """
00121         self._keep_var = keep_var 
00122         self._name = mkdtemp(suffix, prefix, dir)
00123 
    def getName(self):

def validate_patch::TempDir::getName (   self  ) 

Returns the name of the temporary directory

Definition at line 124 of file validate_patch.py.

00124                      :
00125         """Returns the name of the temporary directory"""
00126         return self._name
00127     
    def __str__(self):

def validate_patch::TempDir::__str__ (   self  ) 

Convert to string.

Definition at line 128 of file validate_patch.py.

00128                      :
00129         """Convert to string."""
00130         return self.getName()
00131 
    def __del__(self):

def validate_patch::TempDir::__del__ (   self  ) 

Destructor.

Remove the temporary directory.

Definition at line 132 of file validate_patch.py.

00132                      :
00133         """Destructor.
00134         
00135         Remove the temporary directory.
00136         """
00137         if self._name:
00138             if self._keep_var in os.environ:
00139                 logging.info("%s set: I do not remove the temporary directory '%s'",
00140                              self._keep_var, self._name)
00141                 return
00142             rmtree(self._name)
00143 
def check_out_gaudi(path):


Member Data Documentation

Definition at line 121 of file validate_patch.py.

Definition at line 122 of file validate_patch.py.


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

Generated at Wed Mar 17 18:22:45 2010 for Gaudi Framework, version v21r8 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004