The Gaudi Framework  v32r2 (46d42edc)
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 443 of file GaudiTest.py.

Member Function Documentation

◆ __add__()

def GaudiTest.FilePreprocessor.__add__ (   self,
  rhs 
)

Reimplemented in GaudiTest.RegexpReplacer, and GaudiTest.FilePreprocessorSequence.

Definition at line 466 of file GaudiTest.py.

466  def __add__(self, rhs):
467  return FilePreprocessorSequence([self, rhs])
468 
469 

◆ __call__()

def GaudiTest.FilePreprocessor.__call__ (   self,
  input 
)

Reimplemented in GaudiTest.FilePreprocessorSequence.

Definition at line 450 of file GaudiTest.py.

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

◆ __processLine__()

def GaudiTest.FilePreprocessor.__processLine__ (   self,
  line 
)

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

Definition at line 447 of file GaudiTest.py.

447  def __processLine__(self, line):
448  return line
449 

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