- 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']
>>>
推薦閱讀
- Boost程序庫完全開發(fā)指南:深入C++”準(zhǔn)”標(biāo)準(zhǔn)庫(第5版)
- 自己動(dòng)手實(shí)現(xiàn)Lua:虛擬機(jī)、編譯器和標(biāo)準(zhǔn)庫
- 營銷數(shù)據(jù)科學(xué):用R和Python進(jìn)行預(yù)測分析的建模技術(shù)
- Learn Swift by Building Applications
- Mastering ServiceNow(Second Edition)
- Visual Basic程序設(shè)計(jì)實(shí)驗(yàn)指導(dǎo)(第二版)
- Java網(wǎng)絡(luò)編程實(shí)戰(zhàn)
- Quantum Computing and Blockchain in Business
- Instant PHP Web Scraping
- Android應(yīng)用開發(fā)實(shí)戰(zhàn)(第2版)
- Python Digital Forensics Cookbook
- 精通Spring:Java Web開發(fā)與Spring Boot高級功能
- TypeScript圖形渲染實(shí)戰(zhàn):2D架構(gòu)設(shè)計(jì)與實(shí)現(xiàn)
- Drupal 8 Development Cookbook(Second Edition)
- Raspberry Pi Robotic Projects