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

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']
>>>
主站蜘蛛池模板: 项城市| 博客| 赣州市| 安顺市| 历史| 莫力| 桦川县| 农安县| 松原市| 九龙城区| 营口市| 仁怀市| 宜春市| 苏尼特左旗| 海南省| 常山县| 平果县| 双鸭山市| 禄劝| 威信县| 信丰县| 昭通市| 霍林郭勒市| 庆阳市| 大冶市| 新疆| 荣昌县| 河曲县| 新密市| 英吉沙县| 武邑县| 西青区| 山东省| 马尔康县| 墨竹工卡县| 合肥市| 新沂市| 繁昌县| 溧阳市| 山阴县| 瓦房店市|