- 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']
>>>
推薦閱讀
- Learning Java Functional Programming
- Learning Cython Programming(Second Edition)
- Maven Build Customization
- Getting Started with ResearchKit
- 3D少兒游戲編程(原書第2版)
- Java EE核心技術與應用
- Fastdata Processing with Spark
- Scala Functional Programming Patterns
- 30天學通C#項目案例開發(fā)
- Scratch從入門到精通
- H5+移動營銷設計寶典
- Python第三方庫開發(fā)應用實戰(zhàn)
- Clojure Web Development Essentials
- 零基礎PHP從入門到精通
- Android開發(fā)權威指南(第二版)