[Tutor] Typing 'h', 'e', 'l', 'p', 'Enter' in a window

Marc Tompkins marc.tompkins at gmail.com
Thu Jun 27 04:16:45 CEST 2013


On Wed, Jun 26, 2013 at 1:45 PM, kdarroud <khosrodarroudi102 at msn.com> wrote:

> In our Windows machine, we have several windows open.
> Using Python, how can I type 'h', 'e', 'l', 'p', 'Enter' in a specific
> window that is open?
>

In general, Python out-of-the-box doesn't know about OS-specific things
like interacting with other windows; you need to interact with the
operating system to do that.  In the case of Windows, there's a module
called pywin - http://sourceforge.net/projects/pywin32/ - that provides a
Python-accessible wrapper around the Windows API.

Basically, you need to find the Windows API call(s) you need in order to
achieve your goal (definitely not a Python question; some folks on this
list might be able to help you, but there are better resources for Windows
programmers), and then call them via pywin.  The pywin documentation is
very, very minimal - _all_ that pywin does is provide a Python binding for
Windows API calls.

If you have questions about invoking pywin after you've downloaded and
installed it, or general Python questions, this list is the place.  For
everything else... not so much.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130626/07f906fa/attachment.html>


More information about the Tutor mailing list