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

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']
>>>
主站蜘蛛池模板: 汝城县| 吴忠市| 若尔盖县| 邛崃市| 黄山市| 塔河县| 句容市| 冕宁县| 山西省| 鹰潭市| 隆德县| 河北省| 沙洋县| 米脂县| 囊谦县| 元氏县| 同江市| 胶州市| 贵溪市| 河曲县| 读书| 耒阳市| 获嘉县| 鹰潭市| 兴隆县| 南郑县| 莱芜市| 通州市| 滦南县| 灌阳县| 岳普湖县| 德格县| 柳江县| 云梦县| 牙克石市| 托克逊县| 抚顺县| 湟源县| 都昌县| 四平市| 龙里县|