def new_grep(text=None, parent=None):
 widget = Grep(parent=parent)
 if text:
  widget.search_for(text)
 return widget

def new_grep ( text = None , parent = None ) : widget = Grep ( parent = parent ) if text : widget . search_for ( text ) return widget
construct a new grep dialog .