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

Public Member Functions

def __init__ (self)
 
def __call__ (self, warning)
 

Public Attributes

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

Private Attributes

 _warned
 

Detailed Description

Syntactic sugar object to make writing a single instance of a warning to stderr
    (no matter how many times it's called) easier.

Definition at line 80 of file MakeCanvases.py.

Constructor & Destructor Documentation

def generic.controllers.MakeCanvases.Warner.__init__ (   self)

Definition at line 84 of file MakeCanvases.py.

Member Function Documentation

def generic.controllers.MakeCanvases.Warner.__call__ (   self,
  warning 
)

Definition at line 87 of file MakeCanvases.py.

References generic.controllers.MakeCanvases.Warner._warned.

87  def __call__(self, warning):
88  if warning in self._warned:
89  return
90 
91  self._warned.add(warning)
92  print >> sys.stderr, "\n\n\033[31m\033[1mWarning:\033[0m", warning, "\n"
93 

Member Data Documentation

generic.controllers.MakeCanvases.Warner._warned
private

Definition at line 85 of file MakeCanvases.py.

Referenced by generic.controllers.MakeCanvases.Warner.__call__().

char object::name
inherited
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: