Public Member Functions | Public Attributes | List of all members
generic.controllers.ControllerBase.ControllerBase Class Reference
Inheritance diagram for generic.controllers.ControllerBase.ControllerBase:
object

Public Member Functions

def __init__ (self, config)
 
def PrepareOutputPath (self, dirname_bits)
 

Public Attributes

 config
 
short int type
 
short int number
 
char name [SIZE_OF_OBJ_NAME]
 
cat_entry star
 

Detailed Description

Base class for Controllers. 

Definition at line 11 of file ControllerBase.py.

Constructor & Destructor Documentation

def generic.controllers.ControllerBase.ControllerBase.__init__ (   self,
  config 
)

Definition at line 14 of file ControllerBase.py.

Member Function Documentation

def generic.controllers.ControllerBase.ControllerBase.PrepareOutputPath (   self,
  dirname_bits 
)
Build a fully-qualified output path from the given dir string,
using the config's base directory, and then do a `mkdir -p` to
make sure the directory structure exists. 

Definition at line 17 of file ControllerBase.py.

17  def PrepareOutputPath(self, *dirname_bits):
18  """ Build a fully-qualified output path from the given dir string,
19  using the config's base directory, and then do a `mkdir -p` to
20  make sure the directory structure exists. """
21 
22  path = os.path.join(self.config.validation_dir, os.path.join(*dirname_bits) )
23  dirname = os.path.dirname(path)
24 
25  if not os.path.isdir(dirname):
26  print "Directory '%s' does not exist. Creating it..." % dirname
27  if self.config.make_dirs:
28  os.makedirs(dirname)
29  else:
30  "Abort."
31  raise OSError("Directory not found: '%s'" % dirname)
32 
33  return path
34 
35 

Member Data Documentation

generic.controllers.ControllerBase.ControllerBase.config

Definition at line 15 of file ControllerBase.py.

short int object::number
inherited

Definition at line 115 of file novas.h.

cat_entry object::star
inherited

Definition at line 117 of file novas.h.

short int object::type
inherited

Definition at line 114 of file novas.h.


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