Framework for pexpect