Skip to main content

A command line bot library using the pexpect library

Project description

Pexpect Parser

A parser using the parsegrammar library to create automated bots for command line programs.


An example of this code can be found in the following projects:


Pip installation is reccommended

pip install -u pexpectparser

Or if you are using PipEnv

pipenv shell
pipenv install pexpectparser



import pexpectParser as pp

Creating Class

parser = pp.Parser(<Grammar>)

where <Grammar> is a Grammar Object from the Parse Grammar Library.

API Usage

process =

where type(process) is <class 'pexpect.pty_spawn.spawn'>,

  • meaning that process is an object returned from pexpect.spawn(<cmd>)

where <cmd> is the start symbol of <Grammar>

  • for more information about <Grammar> objects, see parsegrammar

Errors that can be thrown:

  • Timeout Error
    • Class pexpect.exceptions.TIMEOUT
  • EOF Error
    • Class pexpect.exceptions.EOF


This project has the following dependencies:

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

pexpectparser-0.1.1.tar.gz (2.5 kB view hashes)

Uploaded source

Built Distribution

pexpectparser-0.1.1-py3-none-any.whl (14.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page