Creating a Keylogger in Python