CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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.

23 
24 def setQuietWarn (quiet = True):
25  global quietWarn
26  quietWarn = quiet
27 
def setQuietWarn
Definition: GenObject.py:23
def GenObject.warn (   args,
  kwargs 
)
print out warning with line number and rest of arguments

Definition at line 28 of file GenObject.py.

28 
29 def warn (*args, **kwargs):
30  """print out warning with line number and rest of arguments"""
31  if quietWarn: return
32  frame = inspect.stack()[1]
33  filename = frame[1]
34  lineNum = frame[2]
35  #print filename, filenameRE
36  filename = filenameRE.sub ('', filename)
37  #print "after '%s'" % filename
38  blankLines = kwargs.get('blankLines', 0)
39  if blankLines:
40  print '\n' * blankLines
41  spaces = kwargs.get('spaces', 0)
42  if spaces:
43  print ' ' * spaces,
44  if len (args):
45  print "%s (%s): " % (filename, lineNum),
46  for arg in args:
47  print arg,
48  print
49  else:
50  print "%s (%s):" % (filename, lineNum)
51 
def warn
Definition: GenObject.py:28

Variable Documentation

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

Definition at line 19 of file GenObject.py.

GenObject.quietWarn = False

Definition at line 21 of file GenObject.py.