switch pexpect to Python 3