learn pexpect for base