title: Python Locking the mouse and keyboard
body: <p>I am writing a code in which I need to lock the user's input via mouse and keyboard.
  I am using sockets and when i get the message "LOCK" it should lock the computer and when I get the message "UNLOCK" it will unlock the user's PC.
  I've tried using the module pyhook but if I use this module then the program will stop and I cant receive info from the socket. I have also tried working with pynput but I couldn't find a way to lock the keyboard/ mouse.</p>