parameters: (fname, search_for)
return_statement: return found
docstring: Equivalent of grep
docstring_summary: Equivalent of grep
docstring_tokens: Equivalent of grep
function: def file_contains(fname, search_for):
      '''Equivalent of grep'''
      from re import compile,escape
      regex = compile(escape(search_for))
      found = False
  
      f = open(fname, 'r')
      for l in f:
          if regex.search(l):
              found = True
              break
      f.close()
      
      return found
function_tokens: def file_contains ( fname , search_for ) : from re import compile , escape regex = compile ( escape ( search_for ) ) found = False f = open ( fname , 'r' ) for l in f : if regex . search ( l ) : found = True break f . close ( ) return found