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 24 of file GenObject.py.

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

Definition at line 29 of file GenObject.py.

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

Variable Documentation

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

Definition at line 20 of file GenObject.py.

GenObject.quietWarn = False

Definition at line 22 of file GenObject.py.