2, in <module> ValueError: Must be > 0 The above exception was the direct cause of the following exception: Traceback (most recent call last): File "<stdin>", line 4, in <module> RuntimeError: Failed
open(b'jalape\xf1o.txt', 'w') >>> import os >>> os.listdir('.') ['jalape%F1o.txt', 'jalapeño.txt'] >>> os.listdir(b'.') [b'jalape%F1o.txt', b'jalapen\xcc\x83o.txt >>> Really crazy things in system calls
ser.send(cmd.encode('ascii')+b'\n') resp = ser.readline() if resp != b'Ok\n': raise RuntimeError(resp) It's just serial ports... use pyserial Simple command/response protocol