PSCF v1.1
|
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... | |
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.
def pscfpp.text.RecordEditor.__init__ | ( | self | ) |
Constructor.
Definition at line 149 of file text.py.
References pscfpp.text.RecordEditor.hasFilter, pscfpp.text.FileEditor.hasFilter, pscfpp.text.RecordEditor.hasNew, pscfpp.text.FileEditor.hasNew, pscfpp.text.RecordEditor.isReady, pscfpp.text.FileEditor.isReady, Pscf::PropagatorTmpl< Propagator >.isReady(), Pscf::PropagatorTmpl< TP >.isReady(), Pscf::PropagatorTmpl< Propagator< D > >.isReady(), pscfpp.make.MakeMaker.isTest, pscfpp.text.RecordEditor.isTest, and pscfpp.text.FileEditor.isTest.
def pscfpp.text.RecordEditor.setFilter | ( | self, | |
filter, | |||
field = 0 |
|||
) |
Set filter string.
filter | regular expression string |
field | index of field to be searched for (filter) |
Definition at line 161 of file text.py.
References pscfpp.text.RecordEditor.filter, pscfpp.text.FileEditor.filter, pscfpp.text.RecordEditor.filterField, pscfpp.text.RecordEditor.hasFilter, pscfpp.text.FileEditor.hasFilter, pscfpp.text.RecordEditor.hasNew, pscfpp.text.FileEditor.hasNew, pscfpp.text.RecordEditor.isReady, pscfpp.text.FileEditor.isReady, Pscf::PropagatorTmpl< Propagator >.isReady(), Pscf::PropagatorTmpl< TP >.isReady(), and Pscf::PropagatorTmpl< Propagator< D > >.isReady().
def pscfpp.text.RecordEditor.setNew | ( | self, | |
new, | |||
field | |||
) |
Set new string.
new | new value for field |
field | index of field to be modified |
Definition at line 174 of file text.py.
References pscfpp.text.RecordEditor.dataField, pscfpp.text.RecordEditor.hasFilter, pscfpp.text.FileEditor.hasFilter, pscfpp.text.RecordEditor.hasNew, pscfpp.text.FileEditor.hasNew, pscfpp.text.RecordEditor.isReady, pscfpp.text.FileEditor.isReady, Pscf::PropagatorTmpl< Propagator >.isReady(), Pscf::PropagatorTmpl< TP >.isReady(), Pscf::PropagatorTmpl< Propagator< D > >.isReady(), pscfpp.text.RecordEditor.new, and pscfpp.text.FileEditor.new.
def pscfpp.text.RecordEditor.setIsTest | ( | self, | |
isTest | |||
) |
Set isTest flag, to decide whether to perform a dry run.
isTest | if 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.
def pscfpp.text.RecordEditor.editFile | ( | self, | |
filename | |||
) |
Open and edit the specified file of records.
filename | name of file |
Definition at line 194 of file text.py.
References pscfpp.text.RecordEditor.dataField, pscfpp.text.RecordEditor.filter, pscfpp.text.FileEditor.filter, pscfpp.text.RecordEditor.filterField, pscfpp.text.RecordEditor.isReady, pscfpp.text.FileEditor.isReady, Pscf::PropagatorTmpl< Propagator >.isReady(), Pscf::PropagatorTmpl< Propagator< D > >.isReady(), Pscf::PropagatorTmpl< TP >.isReady(), pscfpp.make.MakeMaker.isTest, pscfpp.text.RecordEditor.isTest, pscfpp.text.FileEditor.isTest, pscfpp.text.RecordEditor.new, and pscfpp.text.FileEditor.new.