{ "info": { "author": "Nick Stevens", "author_email": "nick.stevens@digi.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries" ], "description": "streamexpect\n============\n\n|Build Status| |Coverage Status| |Code Climate| |GitHub Issues| |PyPI|\n|License|\n\nstreamexpect is a library providing cross-platform \"expect-like\"\nfunctionality for generic Python streams and sockets . It is similar to\nthe `Pexpect `__ library, except where\nPexpect explicitly requires an underlying file (usually a TTY),\nstreamexpect uses duck-typing and requires only a ``read`` or ``recv``\nmethod.\n\n`View the Full\nDocumentation `__\n\nThe original version of streamexpect was generously donated by\n`Digi `__ `Wireless Design\nServices `__. The software is provided as Alpha\nsoftware and has not undergone formal testing. It does, however, ship\nwith extensive unit testing.\n\n`View the\nChangelog `__\n\nInstallation\n============\n\nInstallation is performed using pip. The latest released version of\nstreamexpect can be obtained with the following command:\n\n.. code:: sh\n\n $ pip install streamexpect\n\nTo install the development version from GitHub:\n\n.. code:: sh\n\n $ pip install -U -e 'git+https://github.com/digidotcom/python-streamexpect#egg=streamexpect'\n\nExample\n=======\n\nThe following example shows opening a serial port (on a Windows PC),\nsending the ``uname`` command, and verifying that *Linux* is in the\nreturned data.\n\n.. code:: python\n\n import serial\n import streamexpect\n\n # timeout=0 is essential, as streams are required to be non-blocking\n ser = serial.Serial('COM1', baudrate=115200, timeout=0)\n\n with streamexpect.wrap(ser) as stream:\n stream.write('\\r\\nuname -a\\r\\n')\n match = stream.expect_bytes('Linux', timeout=1.0)\n print(u'Found Linux at index {}'.format(match.start))\n\nDesign Goals\n============\n\n- Be Cross-Platform\n\nThe library should not depend on any features (besides Python) that\nexclude a platform. Yes, that means Windows is a first-class citizen.\n\n- Be Explicit In Encoding\n\nWhen dealing with streams of data, the distinction between when the\nstream goes from being a series of binary bytes to a set of encoded\ncharacters can be unclear. The library should be explicit in the\nhandling of binary versus characters, such that mixing the two types is\nnot allowed without explicit options to enable encoding and decoding.\n\n- Common Use Cases Should Be Simple\n\nFor 95% of users, the ``streamexpect.wrap`` function should accomplish\nthe desired goals. Intelligent default options should be used so the\nlibrary just \"does the right thing\".\n\n- Complicated Use Cases Should Be Possible\n\nThe objects returned by the ``streamexpect.wrap`` function should\nthemselves be easy to use and extend. Protocol requirements between\nclasses should be explicit and documented.\n\nDevelopment\n===========\n\nDevelopment of streamexpect takes place in the open on GitHub. Please\nuse pull requests to submit changes to code and documentation.\n\nThe process for building and testing streamexpect has been automated as\nmuch as possible. `tox `__ handles building\nand testing the code, as well as generating documentation and\nautomatically testing for code style issues. tox can be installed with\npip:\n\n::\n\n pip install tox\n\nThe generic tox command looks like:\n\n::\n\n tox\n\nThis will attempt to build and test streamexpect against multiple\ndifferent versions of Python, and will error on versions not found. To\ntest against only a single version of Python, specify the version at the\ntox command line. For example, to test only Python 2.7:\n\n::\n\n tox -e py27\n\nMultiple versions may be specified, separated by a comma:\n\n::\n\n tox -e py27,py35\n\nDocumentation generation and code style checking are not performed by\ndefault, and so must be explicitly provided to the tox command.\nDocumentation generation requires either Python 2.7, or Python 3.3 or\ngreater.\n\n::\n\n tox -e docs,style\n\nLicense\n=======\n\nThis software is open-source software. Copyright Digi International,\n2015.\n\nThis Source Code Form is subject to the terms of the Mozilla Public\nLicense, v. 2.0. If a copy of the MPL was not distributed with this\nfile, you can obtain one at http://mozilla.org/MPL/2.0/.\n\n.. |Build Status| image:: https://travis-ci.org/digidotcom/python-streamexpect.svg?branch=master\n :target: https://travis-ci.org/digidotcom/python-streamexpect\n.. |Coverage Status| image:: https://img.shields.io/coveralls/digidotcom/python-streamexpect.svg\n :target: https://coveralls.io/r/digidotcom/python-streamexpect\n.. |Code Climate| image:: https://img.shields.io/codeclimate/github/digidotcom/python-streamexpect.svg\n :target: https://codeclimate.com/github/digidotcom/python-streamexpect\n.. |GitHub Issues| image:: https://img.shields.io/github/issues/digidotcom/python-streamexpect.svg\n :target: https://github.com/digidotcom/python-streamexpect/issues\n.. |PyPI| image:: https://img.shields.io/pypi/v/streamexpect.svg\n :target: https://pypi.python.org/pypi/streamexpect/\n.. |License| image:: https://img.shields.io/badge/license-MPL%202.0-blue.svg\n :target: https://github.com/digidotcom/python-streamexpect/blob/master/LICENSE.txt", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/digidotcom/python-streamexpect", "keywords": "expect pexpect search stream serial pyserial socket", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "streamexpect", "package_url": "https://pypi.org/project/streamexpect/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/streamexpect/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/digidotcom/python-streamexpect" }, "release_url": "https://pypi.org/project/streamexpect/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "expect-like tools over a Python stream", "version": "0.2.1" }, "last_serial": 2447042, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "e0af7978111e9d1e97024167d0f7b48c", "sha256": "e294ebe4fddd65c445b6ed7c8e62364ed2f18655b700ac7566fd57221e41d8f5" }, "downloads": -1, "filename": "streamexpect-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e0af7978111e9d1e97024167d0f7b48c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15120, "upload_time": "2016-01-19T18:27:18", "url": "https://files.pythonhosted.org/packages/11/52/bf6fdf19bfc2dfd59df6e2ad73737665ab5e3aa6b28e2043c09f92daee6c/streamexpect-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "46e611d4e349a7a0497cbe3e1b5e4580", "sha256": "0ef3f22385dfa06d33b58b0294444e2f1b2b6e77e08b66b00821caedc76860ee" }, "downloads": -1, "filename": "streamexpect-0.2.1.tar.gz", "has_sig": false, "md5_digest": "46e611d4e349a7a0497cbe3e1b5e4580", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13571, "upload_time": "2016-11-07T14:13:59", "url": "https://files.pythonhosted.org/packages/10/98/fae2035b7fce8d0f04b5a883c745ce3dab453510a0d46a162e5180402e42/streamexpect-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "46e611d4e349a7a0497cbe3e1b5e4580", "sha256": "0ef3f22385dfa06d33b58b0294444e2f1b2b6e77e08b66b00821caedc76860ee" }, "downloads": -1, "filename": "streamexpect-0.2.1.tar.gz", "has_sig": false, "md5_digest": "46e611d4e349a7a0497cbe3e1b5e4580", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13571, "upload_time": "2016-11-07T14:13:59", "url": "https://files.pythonhosted.org/packages/10/98/fae2035b7fce8d0f04b5a883c745ce3dab453510a0d46a162e5180402e42/streamexpect-0.2.1.tar.gz" } ] }