The Gaudi Framework  v31r0 (aeb156f0)
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 442 of file GaudiTest.py.

Member Function Documentation

def GaudiTest.FilePreprocessor.__add__ (   self,
  rhs 
)

Definition at line 465 of file GaudiTest.py.

465  def __add__(self, rhs):
466  return FilePreprocessorSequence([self, rhs])
467 
468 
def __add__(self, rhs)
Definition: GaudiTest.py:465
def GaudiTest.FilePreprocessor.__call__ (   self,
  input 
)

Definition at line 449 of file GaudiTest.py.

449  def __call__(self, input):
450  if hasattr(input, "__iter__"):
451  lines = input
452  mergeback = False
453  else:
454  lines = input.splitlines()
455  mergeback = True
456  output = []
457  for l in lines:
458  l = self.__processLine__(l)
459  if l:
460  output.append(l)
461  if mergeback:
462  output = '\n'.join(output)
463  return output
464 
def __processLine__(self, line)
Definition: GaudiTest.py:446
def __call__(self, input)
Definition: GaudiTest.py:449
def GaudiTest.FilePreprocessor.__processLine__ (   self,
  line 
)

Definition at line 446 of file GaudiTest.py.

446  def __processLine__(self, line):
447  return line
448 
def __processLine__(self, line)
Definition: GaudiTest.py:446

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