官术网_书友最值得收藏!

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']
>>>
主站蜘蛛池模板: 策勒县| 句容市| 拜城县| 确山县| 乌恰县| 南涧| 瑞昌市| 宜春市| 饶平县| 祥云县| 开远市| 五指山市| 禄丰县| 桂平市| 深泽县| 桦南县| 庐江县| 咸宁市| 扎兰屯市| 马龙县| 桐庐县| 鹤山市| 塔城市| 枝江市| 读书| 福清市| 武功县| 靖江市| 昭平县| 桦南县| 竹山县| 西畴县| 梅河口市| 嘉义县| 高平市| 柳州市| 浮山县| 北安市| 突泉县| 铁力市| 嵊泗县|