CMS 3D CMS Logo

Classes | Functions | Variables

GenObject Namespace Reference

Classes

class  GenObject

Functions

def setQuietWarn
def warn

Variables

tuple filenameRE = re.compile(r'.+/Validation/Tools/')
 quietWarn = False

Function Documentation

def GenObject::setQuietWarn (   quiet = True)

Definition at line 23 of file GenObject.py.

00024                                :
00025     global quietWarn
00026     quietWarn = quiet
00027 

def GenObject::warn (   args,
  kwargs 
)
print out warning with line number and rest of arguments

Definition at line 28 of file GenObject.py.

00029                           :
00030     """print out warning with line number and rest of arguments"""
00031     if quietWarn: return
00032     frame = inspect.stack()[1]
00033     filename = frame[1]
00034     lineNum  = frame[2]
00035     #print filename, filenameRE
00036     filename = filenameRE.sub ('', filename)
00037     #print "after '%s'" % filename
00038     blankLines = kwargs.get('blankLines', 0)
00039     if blankLines:
00040         print '\n' * blankLines
00041     spaces = kwargs.get('spaces', 0)
00042     if spaces:
00043         print ' ' * spaces,
00044     if len (args):
00045         print "%s (%s): " % (filename, lineNum),
00046         for arg in args:
00047             print arg,
00048         print
00049     else:
00050         print "%s (%s):" % (filename, lineNum)
00051 


Variable Documentation

tuple GenObject::filenameRE = re.compile(r'.+/Validation/Tools/')

Definition at line 19 of file GenObject.py.

Definition at line 21 of file GenObject.py.