Pure Python Expect-like module