pexpect is a non standard module. Please replace it by `subprocess`, which does the same thing for what you need. Thanks.