serpentTools.engines.PatternReader¶
-
class
serpentTools.engines.
PatternReader
(filePath)¶ Class that can read over a file looking for patterns.
- Parameters
filePath (str) – path to the file that is to be read
-
searchFor
(pattern)¶ Return true if the pattern is found.
- Parameters
pattern (str or compiled regular expression) –
- Returns
bool
- Return type
True if the pattern was found
-
seekToTop
()¶ Reset the file pointer to the start of the file.