https://github.com/antoniovazquezblanco/pexpect-serialspawn
Serial support for pexpect
https://github.com/antoniovazquezblanco/pexpect-serialspawn
pexpect python python3 serial
Last synced: 9 months ago
JSON representation
Serial support for pexpect
- Host: GitHub
- URL: https://github.com/antoniovazquezblanco/pexpect-serialspawn
- Owner: antoniovazquezblanco
- Created: 2023-10-15T21:09:28.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-09-08T19:55:22.000Z (10 months ago)
- Last Synced: 2025-09-18T21:50:01.225Z (9 months ago)
- Topics: pexpect, python, python3, serial
- Language: Python
- Homepage: https://pypi.org/project/pexpect-serialspawn/
- Size: 16.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Serial spawn for pexpect
[](https://github.com/antoniovazquezblanco/pexpect-serialspawn/actions/workflows/build.yml)
[](https://snyk.io/advisor/python/pexpect-serialspawn)
Interact with serial devices using pexpect.
## Installation
Just use pip :)
```
pip install pexpect-serialspawn
```
## Usage
```python
import serial
from pexpect_serialspawn import SerialSpawn
# Initialize your serial device
ser = serial.Serial('COM1', 115200)
# Spawn a pexpect object
ss = SerialSpawn(ser, encoding='utf-8')
# Use as any other pexpect spawns...
ss.sendline('Hello')
ss.expect('World')
```