Skip to content

antoniovazquezblanco/pexpect-serialspawn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serial spawn for pexpect

Build pexpect-serialspawn

Interact with serial devices using pexpect.

Installation

Just use pip :)

pip install pexpect-serialspawn

Usage

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

About

Serial support for pexpect

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages