5

I am coding a simple keylogger using Python. I hope to use pyHook to capture keyboard events.I couldn't find any packages of pyHook for python 3.3 which I have installed. Is there any other module for python 3.3 which provides similar functionalities?

Deepal
  • 1,729
  • 5
  • 24
  • 34
  • I suppose using a previous version of Python is out of the question? – Inbar Rose Apr 10 '13 at 08:06
  • Do you need to use a binary package, instead of, say, installing MinGW or Visual Studio Express and [building it from source](http://sourceforge.net/apps/mediawiki/pyhook/index.php?title=PyHook_Build_Instructions)? I haven't tried building it for 3.x, but in [this question](http://stackoverflow.com/questions/14449956/python-crash-with-pyhook-hookmanager-on-keydown-ctrlc) it looks like the OP has done it. – abarnert Apr 10 '13 at 08:10
  • I tried to install it with .exe. But it asks me for python 2.7. I want to use pyHook with current installation of python instead of moving to an older version of python – Deepal Apr 10 '13 at 08:17
  • There are separate .exe installers for each version of Python. That's how all binary installers work (at least for packages that have C/SWIG/etc. extension code). So, you can't use the 2.7 installer with 3.3. But you can install from source. – abarnert Apr 10 '13 at 08:17

2 Answers2

6

A quick google turned up this site, which has unofficial installers for pyHook 1.5.1 (and a whole lot of other packages) for Python 3.3. I haven't tested it, but it seems worth trying. And there are a couple of other similar repositories on the first page of Google results if this one doesn't work.

I also found a few forks on github, like this one, which have fixes for Unicode bugs in 3.x. I have no idea if those bugs have been fixed in the main pyHook project (or made it into the 1.5.1 release), but if you run into problems, you may want to take a look.

You'd have a lot more options if you installed a compiler (MinGW and/or Visual Studio Express) and used easy_install or pip to install packages automatically, building them from source if necessary. Then you wouldn't need to search for binary installers for everything.

abarnert
  • 354,177
  • 51
  • 601
  • 671
0

The inofficial installers mentioned by abarnert seem to work fine. They provide installers for almost every version of Python - except for 3.5, which is currently considered unstable anyway (07/10/14), so that's not a big issue.

Fonic
  • 2,625
  • 23
  • 20