OSError: Unsupported platform 'CYGWIN_NT-10.0-19044'

Jose Isaias Cabrera jicman@outlook.com
Mon Feb 20 21:41:51 GMT 2023

On Monday, February 20, 2023 03:48 PM, Henry S. Thompson  expressed:

> Two things to try:
> 1) Run python from an elevated shell (unlikely to make a difference);

This was the easy part. :-) Same issue.

> 2) Same strategy -- edit _nixcommon.py to always return true from
> ensure_root.

Now, it's getting a little deeper, but I will try this again tomorrow.

$ cat chkKBoard.py
import keyboard
while True:
    if keyboard.is_pressed("a"):
        print("You pressed 'a'.")

$ ./chkKBoard.py
/usr/local/lib/python3.9/site-packages/keyboard/_nixkeyboard.py:110: UserWarning: Failed to create a device file using `uinput` module. Sending of events may be limited or unavailable depending on plugged-in devices.
  device = aggregate_devices('kbd')
Traceback (most recent call last):
  File "/home/E608313/./chkKBoard.py", line 4, in <module>
    if keyboard.is_pressed("a"):
  File "/usr/local/lib/python3.9/site-packages/keyboard/__init__.py", line 410, in is_pressed
  File "/usr/local/lib/python3.9/site-packages/keyboard/_generic.py", line 35, in start_if_necessary
  File "/usr/local/lib/python3.9/site-packages/keyboard/__init__.py", line 196, in init
  File "/usr/local/lib/python3.9/site-packages/keyboard/_nixkeyboard.py", line 113, in init
  File "/usr/local/lib/python3.9/site-packages/keyboard/_nixkeyboard.py", line 110, in build_device
    device = aggregate_devices('kbd')
  File "/usr/local/lib/python3.9/site-packages/keyboard/_nixcommon.py", line 168, in aggregate_devices
    assert fake_device

This is tomorrow's problem. Can't work tomorrow's problem today. :-) Thanks for the ideas.

More information about the Cygwin mailing list