[Tutor] hard time importing a module

Frank Schiro fahraynk at gmail.com
Fri Apr 19 16:49:38 CEST 2013


hi I have a question about modules ...

Im trying to use a 3rd party module called pywinatuo. It said I had to
install 2 other modules. 1 was called sendkeys.py, the other was ctypes.
Ctypes was included in the python library I had, but sendkeys was not.

After I found SendKeys, I put it in a directory I found in sys.path, and
then type import SendKeys. I got an error because sendkeys was trying to
import from another file called _sendkeys. After searching I found
_sendkeys, but it is .c

I know that you can somehow extend python with c from reading this article
: http://docs.python.org/2/extending/extending.html

But... how do I get the interpreter to recognize the _sendkeys.c file when
sendkeys.py trys to import it ? I get errors right away since c uses * to
comment so python doesnt recognize it and errors on all of the comments
from _sendkeys.c

Basically how do I correctly import this module that doesnt have a setup.py
?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130419/9ab3e673/attachment.html>


More information about the Tutor mailing list