How can I use a pseudoterminal in python to emulate a serial port?,time.sleep(3)