-1

I'm trying to rebuild the pyhook libary as described in this answer here.

Basically, I need to change a few lines of the C code for the pyhook module.

The problem is I don't know how to access the C code or how to rebuild the libary.

I've heard of Cython but I don't understand it and I don't know how to use it.

Also, I would like the solution to be compatible with py2exe.

karel
  • 5,489
  • 46
  • 45
  • 50
staad
  • 796
  • 8
  • 20

1 Answers1

2

You need to download the C code first - it's not part of the exe install. Unzip it and you then have a source tree that will build.

To build it you'll need a C compiler. You need to use the SAME ONE as your Python version for your platform. For example, for Windows and Python 3.5 you need the latest Visual C from Microsoft.

For pyHook you also need SWIG. Use that to construct cpyHook_wrap.c from the supplied cpyHook.i

Then run setup.py and you should be good to go.

strubbly
  • 3,347
  • 3
  • 24
  • 36
  • Is it possible to do this without a ressource consuming program (Visual C)? Do C compilers exist on their own and would they work? – staad Feb 19 '16 at 22:33
  • You need to use the same compiler as the version of python you are using. The visual C compiler is not big but I don't know how to install it on its own. – strubbly Feb 20 '16 at 00:26