Skip to main content

Windows alternative of pexpect rebuild by uv

Project description

wexpect

I fork it from : raczben/wexpect

And it is rebuild by uv, for branch dev.

Description

Wexpect is a Windows variant of pexpect.

Installation

pip install wexpect-uv

Usage

import wexpect

prompt = '[A-Z]\:.+>'

child = wexpect.spawn('cmd.exe')
child.expect(prompt)    # Wait for startup prompt

child.sendline('dir')   # List the current directory
child.expect(prompt)

print(child.before)     # Print the list
child.sendline('exit')

For more information see examples folder.

How to test and develop locally

You need uv, see installation.

Then,

git clone https://github.com/XnneHangLab/wexpect-uv.git
uv lock
uv sync

Then you can use uv run wexpect to use it in command line or import wexpect in python. You can modify the code and test then PR to me if you want.

Download files

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

Source Distribution

wexpect_uv-0.0.2.tar.gz (96.0 kB view details)

Uploaded Source

Built Distribution

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

wexpect_uv-0.0.2-py3-none-any.whl (46.9 kB view details)

Uploaded Python 3

File details

Details for the file wexpect_uv-0.0.2.tar.gz.

File metadata

  • Download URL: wexpect_uv-0.0.2.tar.gz
  • Upload date:
  • Size: 96.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.14

File hashes

Hashes for wexpect_uv-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ac6d4392b681e9c2ce3c155a57e8ab1b3685a4047cf05af0bbdc6f151871edf0
MD5 4f073d209c87dd396e1092df4dc632c0
BLAKE2b-256 9b490ed9357c45f3be8dd6b177f40e9aa3c4efc922757f5bb82d004b6ac47d67

See more details on using hashes here.

File details

Details for the file wexpect_uv-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: wexpect_uv-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 46.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.14

File hashes

Hashes for wexpect_uv-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0aa4116b3b8318193b85740468c6688a90f97a15bd45ccab55d8c8c0bc40eecb
MD5 ac9600a2b39a8a5a25165a4cca9a8e47
BLAKE2b-256 04c78efe062f303b65c1f2b287e50bfb56f1ae363ae553ca0521c9e49dea4d51

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