grep

decida.grep.grep(rexp, file)

synopsis:

Python grep.

arguments:

rexp (str)

regular expression to find in file

file (str)

file to search

result:

  • prints out matching lines in file
  • return list of matching lines in file

example:

>>> from decida.grep import grep
>>> output = grep("Plotname", "smartspice_dc_ascii.raw")
>>> print output
Plotname: DC Analysis, 27 deg C
['Plotname: DC Analysis, 27 deg C']