Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reworking the example #40

Open
yegorich opened this issue Jan 8, 2020 · 1 comment
Open

Reworking the example #40

yegorich opened this issue Jan 8, 2020 · 1 comment

Comments

@yegorich
Copy link
Contributor

yegorich commented Jan 8, 2020

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?

@tehmaze
Copy link
Owner

tehmaze commented Mar 27, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants