0

The executable installer at http://www.rutherfurd.net/python/sendkeys/#version-history is blocked by my corporate firewall, so I'm trying to install from source. Never done it before.

Tried copying the source contents to C:\Python26\Lib\site-packages\SendKeys-0.3, and pointing to the folder as an external library in the Pythonpath Property of my Eclipse Pydev project. Still getting an "ImportError: No module named SendKeys".

Besides SendKeys.py, the folder also has a setup.py, which I tried running, and a _sendkeys.c, which I never compiled. I sense I'm missing some 'install' step, but I don't know how to do it and couldn't find it online.

Any tips or pointers are appreciated.

joaquin
  • 73,527
  • 25
  • 134
  • 146
Emilio M Bumachar
  • 2,352
  • 2
  • 24
  • 29

2 Answers2

0

I know this is old, but I managed to get this working myself, and it took me a fair amount of time to sort it out.

So, for reference, here is what you need to do to set up your system to compile from source (you can reach your goal by other means, but I consider this the easiest one):

  1. Install mingw (install it including the gui). Don't quit the installer, click on Continue.
  2. Choose base and gcc and install those from within the gui installer.
  3. Add <mingw-install-dir>\bin\ to your path.
  4. In your python installation directory (or virtualenv), create the file Lib\distutils\distutils.cfg with the contents

    [build]
    compiler=mingw32
    
  5. For python < 2.7.6, in your python directory, remove all occurrences of -mno-cygwin from the file cygwinccompiler.py

Finally, download sendkeys (i got it from here since the official site was down when I tried), unpack, cd, and run python setup.py install

Community
  • 1
  • 1
Toby
  • 1,652
  • 2
  • 17
  • 28
0

setup.py needs a command. Run setup.py install.

vartec
  • 118,560
  • 34
  • 206
  • 238
  • I get 'invalid synthax' errors from that, both at Pydev and at IDLE. Also tried 'python setup.py install' as per http://docs.python.org/install/index.html, also invalid synthax. – Emilio M Bumachar Apr 19 '11 at 15:23