The Gaudi Framework  v30r3 (a5ef0a68)
GaudiTest.FilePreprocessor Class Reference
Inheritance diagram for GaudiTest.FilePreprocessor:

Public Member Functions

def __processLine__ (self, line)
 
def __call__ (self, input)
 
def __add__ (self, rhs)
 

Detailed Description

Base class for a callable that takes a file and returns a modified
version of it.

Definition at line 430 of file GaudiTest.py.

Member Function Documentation

def GaudiTest.FilePreprocessor.__add__ (   self,
  rhs 
)

Definition at line 453 of file GaudiTest.py.

453  def __add__(self, rhs):
454  return FilePreprocessorSequence([self, rhs])
455 
456 
def __add__(self, rhs)
Definition: GaudiTest.py:453
def GaudiTest.FilePreprocessor.__call__ (   self,
  input 
)

Definition at line 437 of file GaudiTest.py.

437  def __call__(self, input):
438  if hasattr(input, "__iter__"):
439  lines = input
440  mergeback = False
441  else:
442  lines = input.splitlines()
443  mergeback = True
444  output = []
445  for l in lines:
446  l = self.__processLine__(l)
447  if l:
448  output.append(l)
449  if mergeback:
450  output = '\n'.join(output)
451  return output
452 
def __processLine__(self, line)
Definition: GaudiTest.py:434
def __call__(self, input)
Definition: GaudiTest.py:437
def GaudiTest.FilePreprocessor.__processLine__ (   self,
  line 
)

Definition at line 434 of file GaudiTest.py.

434  def __processLine__(self, line):
435  return line
436 
def __processLine__(self, line)
Definition: GaudiTest.py:434

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