open-tl866
open-tl866 copied to clipboard
AClient will not work on Windows
TLDR: Unless you're a Windows expert and know how to fix this, explicitly document that we do not support Windows.
AClient needs to open a COM port, but on Windows you need Administrator privilege to do that. And apparently even when you run a python script under Admin, it still refuses to open a com port, with error "Permission denied".
To test this, open a command prompt as admin (right click on command prompt, open as administrator), run python, and:
import os
os.open("\\.\COM
(Yes, you need all that backslash magic because Windows)
That will actually work. However, running otl866 will not, because otl866 is an exe, and I guess Windows trashes the permissions.
The core functions should abstract pexepect under the hood pretty well. I imagine we could write a generic pexpect replacement pretty easily just using pyserial read() and buffering it ourselves. The biggest drawback would be that we'd loose select and consume more CPU (at least on Windows)
Can we consolidate the other issues into this one? Seems like the core issue, and having the others open may make this difficult to track
Well, I think this is really the only issue -- opening a COM port on Windows in Python via a script installed through setup.py -- and it's a bit of a tough nut to crack. Apparently even my Google-fu isn't good enough to find a workable solution to this one.
I've closed the other issue #67 .