Thanks for the software. I hope it will work on mac OS X as well.
I had to install Xlib and I done this on my virtualenv with
pip install svn+https://svn.code.sf.net/p/python-xlib/code/trunk/
(env)@mymac:/mytest/keylog$ python keylog.py
Traceback (most recent call last):
File "keylog.py", line 21, in <module>
hookman = pyxhook.HookManager()
File "/mytest/keylog/pyxhook.py", line 83, in __init__
self.local_dpy = display.Display()
File "/mytest/keylog/env/lib/python2.7/site-packages/Xlib/display.py", line 83, in __init__
self.display = _BaseDisplay(display)
File "/mytest/keylog/env/lib/python2.7/site-packages/Xlib/display.py", line 65, in __init__
apply(protocol.display.Display.__init__, (self, ) + args, keys)
File "/mytest/keylog/env/lib/python2.7/site-packages/Xlib/protocol/display.py", line 45, in __init__
name, host, displayno, screenno = connect.get_display(display)
File "/mytest/keylog/env/lib/python2.7/site-packages/Xlib/support/connect.py", line 65, in get_display
return mod.get_display(display)
File "/mytest/keylog/env/lib/python2.7/site-packages/Xlib/support/unix_connect.py", line 59, in get_display
raise error.DisplayNameError(display)
Xlib.error.DisplayNameError: Bad display name ""
(env)@mymac:/mytest/keylog$
(env)@mymac:/mytest/keylog$ echo $DISPLAY
(env)@mymac:/mytest/keylog$