xmodem icon indicating copy to clipboard operation
xmodem copied to clipboard

Reworking the example

Open yegorich opened this issue 5 years ago • 1 comments

First of all, is xmodem UNIX only project or does it truly support Windows? If it only supports UNIX-like operating systems, would it make sense to add select() call to the getc() routine so that it can benefit from the timeout parameter?

def getc(size, timeout=1):
    buf = None
    readable,_,_ = select.select([ser], [], [], timeout)
    if ser in readable:
        buf = ser.read(size)

    return buf

I would also replace serial.Serial() with serial.serial_for_url().

What about Py2 support? Does it still make sense to support it?

yegorich avatar Jan 08 '20 09:01 yegorich

Frankly I have no idea, do not possess any Windows endpoint to test on currently.

tehmaze avatar Mar 27 '20 19:03 tehmaze