title: GetLastInputInfo equivalent in Linux to detect last input time
body: <p>Is there a <a href="http://www.geekpedia.com/tutorial210_Retrieving-the-Operating-System-Idle-Time-Uptime-and-Last-Input-Time.html" rel="nofollow noreferrer">GetLastInputInfo</a>() equivalent that can be used in Linux?</p>
  
  <p>The intention is to detect the last input time (keyboard or mouse) of the user.
  Am using python to script the program.</p>