def from_pipe(cls, config): """Create Reader and read tree from incomming pipe.""" temp = cls(config) try: temp.tree = GrepTree.load(sys.stdin) except ValueError: if temp.debug: warn("Choked on input from pipe") temp.tree = GrepTree() return temp