diff options
author | Tomáš Chvátal <tchvatal@suse.com> | 2020-03-12 12:35:21 +0100 |
---|---|---|
committer | Tomáš Chvátal <tchvatal@suse.com> | 2020-03-12 12:35:21 +0100 |
commit | 6f78e3b7cec5adc7db56bae37f97adb05ca2ae5c (patch) | |
tree | c54a03735de33f07a6a3f28c170f70363ce67aa8 /pexpect/replwrap.py | |
parent | 9ad9e86d6834f3630ffec5f2536e9defb4839226 (diff) | |
download | pexpect-git-6f78e3b7cec5adc7db56bae37f97adb05ca2ae5c.tar.gz |
Do not directly call python and use sys.executable
This makes sure the tests and wrapper works on systems where there
is no python2 nor /usr/bin/python available
Diffstat (limited to 'pexpect/replwrap.py')
-rw-r--r-- | pexpect/replwrap.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pexpect/replwrap.py b/pexpect/replwrap.py index c930f1e..6c34ce4 100644 --- a/pexpect/replwrap.py +++ b/pexpect/replwrap.py @@ -108,7 +108,7 @@ class REPLWrapper(object): + command) return u''.join(res + [self.child.before]) -def python(command="python"): +def python(command=sys.executable): """Start a Python shell and return a :class:`REPLWrapper` object.""" return REPLWrapper(command, u">>> ", u"import sys; sys.ps1={0!r}; sys.ps2={1!r}") |