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

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']
>>>
主站蜘蛛池模板: 丽水市| 天津市| 洪洞县| 房山区| 师宗县| 大余县| 梁山县| 高雄县| 永定县| 雅江县| 阳曲县| 遂川县| 威海市| 阳新县| 济源市| 镇康县| 高雄市| 南昌县| 北海市| 贺州市| 比如县| 周宁县| 济南市| 齐齐哈尔市| 江安县| 镇远县| 恩施市| 鄂伦春自治旗| 广东省| 大丰市| 额济纳旗| 奇台县| 冷水江市| 滕州市| 麻阳| 江陵县| 西平县| 石楼县| 青神县| 东宁县| 湄潭县|