Programmed dialogue with interactive streams.
Project description
Installation
pip install xpect
Example usage
See the test suite: https://github.com/eerimoq/expect/blob/master/tests/test_expect.py
A basic login example using pyserial:
>>> import pyserial
>>> import expect
>>> serial_linux = pyserial.Serial("/dev/ttyS0")
>>> linux = expect.Handler(serial_linux)
>>> linux.send("")
>>> linux.expect(r"username: ")
>>> linux.send("root")
>>> linux.expect(r"password: ")
>>> linux.send("root")
>>> linux.expect(r"/home/root $ ")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xpect-1.5.0.tar.gz
(2.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xpect-1.5.0.tar.gz.
File metadata
- Download URL: xpect-1.5.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ea0eb0d8a10cb9944cf08b180bc9e81af71077087f61a6c009ce04f6c4a9c99
|
|
| MD5 |
8c6c26b9fba52c4f268278eadc6132e5
|
|
| BLAKE2b-256 |
4fbdfa34fba4c9e9946537a6196fbca21b686f1093a887b03b094c26ee08967c
|
File details
Details for the file xpect-1.5.0-py2.py3-none-any.whl.
File metadata
- Download URL: xpect-1.5.0-py2.py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70df472203c101bb05936cf53ef421d4d5fdd0b9b95fb3819816c5c251ad73c9
|
|
| MD5 |
d11a3f7f1f5ff37085779d7949a50833
|
|
| BLAKE2b-256 |
d61f9c0aae232d86205a83dd049885e7198c6c06eb47daa416c358f090b37d2d
|