[Tutor] How to add modules?
Peter Otten
__peter__ at web.de
Thu Sep 19 12:05:17 CEST 2013
Naman Kothari wrote:
> Can you please suggest a link from where i can download SendKeys module
> for python. Also provide an explanation to add the module to my library.
> PS: I am a Windows user.
I'd start installing a tool called "pip". I suggest that you follow the
instructions given here:
http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows
The easiest way seems to be (quoting the above page)
"""
Aug 2013 Update:
These answers are outdated or otherwise wordy and difficult. In short:
Download:
Setuptools: https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
Pip: https://raw.github.com/pypa/pip/master/contrib/get-pip.py
Inspect files to confirm they aren't malicious.
Open a console in the download folder as Admin and run...
python ez_setup.py
python get-pip.py
The new binaries easy_install.exe and pip.exe will be found in the
"%ProgramFiles%\PythonXX\Scripts" folder (or similar), which is likely not
in your PATH. I recommend adding it.
"""
As I'm not a windows user have no first-hand experience with the above. Once
you have pip installed you can search the Python package index (aka "Cheese
Shop", <https://pypi.python.org/pypi>) with
$ pip search sendkeys
SendKeys - An implementation of Visual Basic's SendKeys
function
and then install the module with
$ pip install SendKeys
(Don't type "$", it is the prompt on Unix terminals, on Windows you will see
something like "C:\" instead)
As always, as you are installing other people's code they are free to do
arbitrary things with your computer. This includes destroying or stealing
sensitive data.
More information about the Tutor
mailing list