From: Jose Isaias Cabrera <jicman@outlook.com>
To: "Henry S. Thompson" <ht@inf.ed.ac.uk>
Cc: Jim Garrison via Cygwin <cygwin@cygwin.com>
Subject: Re: OSError: Unsupported platform 'CYGWIN_NT-10.0-19044'
Date: Mon, 20 Feb 2023 20:17:17 +0000 [thread overview]
Message-ID: <DB9P251MB00631CC69C1D50011F6E7F53DEA49@DB9P251MB0063.EURP251.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <f5bilfw2mh4.fsf@ecclerig.inf.ed.ac.uk>
On Monday, February 20, 2023 01:57 PM, Henry S. Thompson expressed:
> First thing to find out if it's truly broken, or just not known to
> work.
>
> With a _safe_ test case, just try editting the code to allow Cygwin,
> e.g. on line 121 of keyboard/__init__.py:
>
> if _platform.system() in ['Windows','CYGWIN_NT-10.0-19044']:
This one failed:
$ python3
Python 3.9.10 (main, Jan 20 2022, 21:37:52)
[GCC 11.2.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import keyboard
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.9/site-packages/keyboard/__init__.py", line 122, in <module>
from. import _winkeyboard as _os_keyboard
File "/usr/local/lib/python3.9/site-packages/keyboard/_winkeyboard.py", line 37, in <module>
kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)
AttributeError: module 'ctypes' has no attribute 'WinDLL'
The linux one worked, but...
if keyboard.is_pressed("a"):
File "/usr/local/lib/python3.9/site-packages/keyboard/__init__.py", line 410, in is_pressed
_listener.start_if_necessary()
File "/usr/local/lib/python3.9/site-packages/keyboard/_generic.py", line 35, in start_if_necessary
self.init()
File "/usr/local/lib/python3.9/site-packages/keyboard/__init__.py", line 196, in init
_os_keyboard.init()
File "/usr/local/lib/python3.9/site-packages/keyboard/_nixkeyboard.py", line 113, in init
build_device()
File "/usr/local/lib/python3.9/site-packages/keyboard/_nixkeyboard.py", line 109, in build_device
ensure_root()
File "/usr/local/lib/python3.9/site-packages/keyboard/_nixcommon.py", line 174, in ensure_root
raise ImportError('You must be root to use this library on linux.')
ImportError: You must be root to use this library on linux.
More work to be done.
> One way or the other, you should find out what the _real_ problem is.
Let's see how far I can go. All I want is to capture the ENTER key in a website powered by python3. Thanks for the ideas.
next prev parent reply other threads:[~2023-02-20 20:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 18:04 Jose Isaias Cabrera
2023-02-20 18:57 ` Henry S. Thompson
2023-02-20 20:17 ` Jose Isaias Cabrera [this message]
2023-02-20 20:48 ` Henry S. Thompson
2023-02-20 21:41 ` Jose Isaias Cabrera
2023-02-20 23:13 ` Eliot Moss
2023-02-20 18:58 ` Marco Atzeri
2023-02-20 19:31 ` Jose Isaias Cabrera
2023-02-21 7:52 ` Csaba Raduly
2023-02-21 20:03 ` Jose Isaias Cabrera
2023-02-21 20:52 ` Eliot Moss
2023-02-22 15:56 ` Brian Inglis
2023-02-22 16:54 ` Brian Inglis
2023-02-22 18:06 ` Jose Isaias Cabrera
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DB9P251MB00631CC69C1D50011F6E7F53DEA49@DB9P251MB0063.EURP251.PROD.OUTLOOK.COM \
--to=jicman@outlook.com \
--cc=cygwin@cygwin.com \
--cc=ht@inf.ed.ac.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).