Installation

The installation of the pip and pexpect packages is straightforward:

sudo apt-get install python-pip
sudo apt-get install python3-pip
sudo pip3 install pexpect
sudo pip install pexpect
I am using pip3 for installing Python 3 packages while using PIP for installing packages to my default Python 2 interpreter.

Do a quick to test to make sure the package is usable:

>>> import pexpect
>>> dir(pexpect)
['EOF', 'ExceptionPexpect', 'Expecter', 'PY3',

'TIMEOUT', '__all__', '__builtins__', '__cached__',
'__doc__', '__file__', '__loader__', '__name__',
'__package__', '__path__', '__revision__',
'__spec__', '__version__', 'exceptions', 'expect',
'is_executable_file', 'pty_spawn', 'run', 'runu',
'searcher_re', 'searcher_string', 'spawn',
'spawnbase', 'spawnu', 'split_command_line', 'sys',
'utils', 'which']
>>>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.106.233