PSCF v1.1
Public Member Functions | List of all members
pscfpp.text.RecordEditor Class Reference

Class to modify selected Records in a file of records. More...

Public Member Functions

def __init__ (self)
 Constructor. More...
 
def setFilter (self, filter, field=0)
 Set filter string. More...
 
def setNew (self, new, field)
 Set new string. More...
 
def setIsTest (self, isTest)
 Set isTest flag, to decide whether to perform a dry run. More...
 
def editFile (self, filename)
 Open and edit the specified file of records. More...
 

Detailed Description

Class to modify selected Records in a file of records.

The editFile function searches for records in which one field matches a regular expression, and resets the value of another.

Definition at line 144 of file text.py.

Constructor & Destructor Documentation

◆ __init__()

def pscfpp.text.RecordEditor.__init__ (   self)

Member Function Documentation

◆ setFilter()

def pscfpp.text.RecordEditor.setFilter (   self,
  filter,
  field = 0 
)

◆ setNew()

def pscfpp.text.RecordEditor.setNew (   self,
  new,
  field 
)

◆ setIsTest()

def pscfpp.text.RecordEditor.setIsTest (   self,
  isTest 
)

Set isTest flag, to decide whether to perform a dry run.

Parameters
isTestif true, perform a dry run (no modificatin)

Definition at line 186 of file text.py.

References pscfpp.make.MakeMaker.isTest, pscfpp.text.RecordEditor.isTest, and pscfpp.text.FileEditor.isTest.

◆ editFile()

def pscfpp.text.RecordEditor.editFile (   self,
  filename 
)

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