There are some libraries such as CircuitPython that allow programmers to interact with Arduinos but can one control PC hardware such as the keyboard, usb ports, mouse etc using python?
I have explored various websites but they all focus on controlling Arduinos and Pyboards. I have also tried using the Linux Kernel API (kernel_ffi) but it seems impossible to make a cross-platform script with it.