Metadata-Version: 2.0
Name: xpect
Version: 3.0.0
Summary: Programmed dialogue with interactive streams.
Home-page: https://github.com/eerimoq/expect
Author: Erik Moqvist
Author-email: erik.moqvist@gmail.com
License: MIT
Keywords: expect
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3

|buildstatus|_

Installation
============

.. code-block:: python

    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:

.. code-block:: python

    >>> 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 $ ")


.. |buildstatus| image:: https://travis-ci.org/eerimoq/expect.svg
.. _buildstatus: https://travis-ci.org/eerimoq/expect


