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.1.tar.gz (95.4 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.1-py3-none-any.whl (46.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for wexpect_uv-0.0.1.tar.gz
Algorithm Hash digest
SHA256 dd23cbf9a6f2005a876aad4e2b26991a174ca597a2cfd31f857b079ac51424d9
MD5 dc03058f3bda63b8f9192dfd69c5cc59
BLAKE2b-256 d2b668710472106988963cc37732325ddaafe302eb3f6d6b74a290f619c3d87b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for wexpect_uv-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 beb0836ff68b167c59f64be02f178992bd6763399715b7a95896a90aceca8c9e
MD5 cdc1ceb5e2a08bc2572eaf2eb6f7a710
BLAKE2b-256 95db05977afe90e9e20267c3fec6850271ec433cc22f7b95d97a5c8388076c04

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