rmlsend_cui.py
import serial selected_port = "/dev/tty.usbserial-ftDITGDT" ser = serial.Serial(port=selected_port,baudrate=9600,bytesize=8,parity='N',stopbits=1,timeout=None,xonxoff=0,rtscts=True,writeTimeout=None,dsrdtr=True) f = open("speedcontroller.mill", 'r') with f: data = f.read() ser.write(data)