I have an application where I want to simulate the connection between a device and a \"modem\". The device will be connected to a serial port and will talk to the software m
It's probably best to use pyserial to communicate with the serial port, and you can just create a mock version of the serial.Serial class which implements read, readline, write and any other methods you need.