Metadata-Version: 2.4
Name: wexpect-uv
Version: 0.0.3
Summary: Windows alternative of pexpect rebuild by uv
Project-URL: Source Code, https://github.com/XnneHangLab/wexpect-uv
Author-email: "Noah Spurrier, Richard Holden, Marco Molteni, Kimberley Burchett, Robert Stone, Hartmut Goebel, Chad Schroeder, Erick Tryzelaar, Dave Kirby, Ids vander Molen, George Todd, Noel Taylor, Nicolas D. Cesar, Alexander Gattin, Geoffrey Marshall, Francisco Lourenco, Glen Mabey, Karthik Gurusamy, Fernando Perez, Corey Minyard, Jon Cohen, Guillaume Chazarain, Andrew Ryan, Nick Craig-Wood, Andrew Stone, Jorgen Grahn, Benedek Racz" <betontalpfa@gmail.com>, XnneHang <XnneHang@gmail.com>
License: MIT
License-File: LICENSE
Keywords: automation,expect,pexpect,scripting,wexpect
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Python: <3.14,>=3.9
Requires-Dist: psutil>=5.0.0
Requires-Dist: pywin32>=220
Requires-Dist: setuptools>=76.0.0
Requires-Dist: wcwidth>=0.2.13
Description-Content-Type: text/markdown

# wexpect

I fork it from : [**raczben/wexpect**](https://github.com/raczben/wexpect)

And it is rebuild by uv, for branch [dev](https://github.com/raczben/wexpect/tree/dev).

## Description

Wexpect is a Windows variant of pexpect.

- [x] v0.0.1: fix the [Always Timeout](https://github.com/raczben/wexpect/issues/42) && [failed in uv](https://github.com/raczben/wexpect/issues/26)
- [x] v0.0.2: fix `cannot read console if endwith '\r' print("",end="\r").` .
- [x] v0.0.3: change the catch logic(catch all even cursor not change) and catch ascii colors.

## Installation

```bash
pip install wexpect-uv
```

## Usage

```python
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](https://github.com/XnneHangLab/wexpect-uv) folder.

## How to test and develop locally

You need uv, see [installation](https://docs.astral.sh/uv/getting-started/installation/).

Then,

```bash
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.
