title: How to disable then re-enable keyboard/mouse in Python 3.7.1
body: <p>I am wondering how I can disable my keyboard and mouse in <code>Python 3.7.1</code>. This question was already asked many years ago <a href="https://stackoverflow.com/questions/7529991/disable-or-lock-mouse-and-keyboard-in-python">here</a> but the answers are for python 2.7. All the modules in the answers no longer work on Python 3.7.1.</p>
  
  <p>I am asking as when I use <code>pyautogui</code>, I sometimes forget I cannot touch my keyboard/mouse. Thus, I want to disable my keyboard at at the parts I use <code>pyautogui</code>. Then enable the keyboard/mouse when it doesn't use <code>pyautogui</code></p>