The Gaudi Framework  v33r1 (b1225454)
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 453 of file GaudiTest.py.

Member Function Documentation

◆ __add__()

def GaudiTest.FilePreprocessor.__add__ (   self,
  rhs 
)

Reimplemented in GaudiTest.RegexpReplacer, and GaudiTest.FilePreprocessorSequence.

Definition at line 476 of file GaudiTest.py.

476  def __add__(self, rhs):
477  return FilePreprocessorSequence([self, rhs])
478 
479 

◆ __call__()

def GaudiTest.FilePreprocessor.__call__ (   self,
  input 
)

Reimplemented in GaudiTest.FilePreprocessorSequence.

Definition at line 460 of file GaudiTest.py.

460  def __call__(self, input):
461  if hasattr(input, "__iter__"):
462  lines = input
463  mergeback = False
464  else:
465  lines = input.splitlines()
466  mergeback = True
467  output = []
468  for l in lines:
469  l = self.__processLine__(l)
470  if l:
471  output.append(l)
472  if mergeback:
473  output = '\n'.join(output)
474  return output
475 

◆ __processLine__()

def GaudiTest.FilePreprocessor.__processLine__ (   self,
  line 
)

Reimplemented in GaudiTest.LineSorter, GaudiTest.RegexpReplacer, GaudiTest.BlockSkipper, and GaudiTest.LineSkipper.

Definition at line 457 of file GaudiTest.py.

457  def __processLine__(self, line):
458  return line
459 

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