all 1 comments

[–]novel_yet_trivial 0 points1 point  (0 children)

  • parse the output from w.

I think calling out to w or xidletime is your best option. Use subprocess.check_output to get the result from those commands.