0

I have set up a pyperclip script in python 3.6.3 which allows me to control my computer with keyboard requests. Is it possible to send these requests to another computer with python installed via USB, so that these actions are now carried out on the second computer?

NoisyB
  • 65
  • 2
  • 8

1 Answers1

0

It is possible to link two computers via USB and to communicate via USB using python. You have to use a special USB cable (https://www.quora.com/Is-it-possible-to-connect-2-computers-with-a-USB-cable), and you can use a library like pyusb to achieve that.

However it might be complicated as the USB protocol works as master/slave and a computer is not designed to be a slave on an USB bus (it is the master). A simpler solution if you computers are connected on a network would be to use sockets (https://docs.python.org/3/library/socket.html), or even a python HTTP server/client application (https://docs.python.org/3/library/http.server.html).

Dali
  • 344
  • 1
  • 10