- Mastering Python Networking
- Eric Chou
- 98字
- 2021-07-02 21:42:35
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']
>>>
推薦閱讀
- Advanced Quantitative Finance with C++
- Embedded Linux Projects Using Yocto Project Cookbook
- 移動UI設(shè)計(微課版)
- C和C++安全編碼(原書第2版)
- Network Automation Cookbook
- 云計算通俗講義(第3版)
- Building Minecraft Server Modifications
- Mastering Rust
- Hands-On Automation Testing with Java for Beginners
- Nginx Lua開發(fā)實戰(zhàn)
- 常用工具軟件立體化教程(微課版)
- C# and .NET Core Test Driven Development
- C語言程序設(shè)計實訓(xùn)教程與水平考試指導(dǎo)
- Photoshop智能手機APP界面設(shè)計
- Python數(shù)據(jù)科學(xué)實踐指南