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.

Examples

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

Installation

Pip installation is reccommended

pip install -u pexpectparser

Or if you are using PipEnv

pipenv shell
pipenv install pexpectparser

Usage

Import

import pexpectParser as pp

Creating Class

parser = pp.Parser(<Grammar>)

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

API Usage

process = parser.run()

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

Dependencies

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 details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

Details for the file pexpectparser-0.1.1.tar.gz.

File metadata

  • Download URL: pexpectparser-0.1.1.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.3

File hashes

Hashes for pexpectparser-0.1.1.tar.gz
Algorithm Hash digest
SHA256 db50634595b82bf5c99968702d1d2262cc7ec849671eb814b90ae61d04ae1e39
MD5 05e082a76f1e828fa19c5475a5f9c84b
BLAKE2b-256 067530200a0e4474e85ad9b177fb6c940e1d6a165e4d667aafd4b23be8504a41

See more details on using hashes here.

File details

Details for the file pexpectparser-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pexpectparser-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.3

File hashes

Hashes for pexpectparser-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a61a949512035d089fc85fad8c123d75962da0dec957c36bdd23a2d98cc785d1
MD5 4fa575747ba5bb7443674ecc630e470c
BLAKE2b-256 973d697a82323c1386b27404e76c40aeee74e6496063f6e65b6391480c53d137

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