Skip to main content

Programmed dialogue with interactive streams.

Project description

buildstatus

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 serial
>>> import expect
>>> serial_linux = serial.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xpect-3.1.1.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xpect-3.1.1-py2.py3-none-any.whl (4.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file xpect-3.1.1.tar.gz.

File metadata

  • Download URL: xpect-3.1.1.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for xpect-3.1.1.tar.gz
Algorithm Hash digest
SHA256 19069cd42ea22c9ff71dd51bd54a2b736413824ef497b781766c10a033e56a3c
MD5 9de643f99a6e00a1071703b34a4c330f
BLAKE2b-256 84b4a6bf5f804deeb754863c1becf76535800e4b8557816397d5a71e93dc5933

See more details on using hashes here.

File details

Details for the file xpect-3.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for xpect-3.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 eb3c04e5163be07e0afb0660ae032c4b4999a75e21d28b1ca4d1014dc4a77b5f
MD5 f1299748b0a0e769f8f2a83b2c1933ce
BLAKE2b-256 6461140ae314241f94085cc37b5ad9002ab1c16b64e97023a1da36011b326d00

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page