Python Questions - July 25, 2015

Matt Wheeler m at
Sun Jul 26 22:04:25 CEST 2015

I'll just answer the one part I don't feel has had enough attention yet,
all other parts chopped...

On Sat, 25 Jul 2015 10:39 E.D.G. <edgrsprj at> wrote:

Posted by E.D.G. July 25,


6. What is Python's version of the DOS level "System" command that many
programs use as in:

system "open notepad.exe"

You can use the subprocess module from the standard library for this but...

7. What is Python's version of the SendKey command that many programs use to
send information to an active Windows program as in:

SendKey("Message to be printed on the Notepad screen")


SendKey(Right Arrow Key)

 pywinauto would be my recommendation here. It can be used to automate
sending of keys and button presses, filling in text fields etc., all within
the context of a "connected" application...

8. What commands does Python use to send to, and retrieve information from,
the Windows clipboard?

...And it has an interface for manipulating the clipboard,

Behind the scenes it makes heavy use of the PyWin32 library, and it hides a
lot of the complexity you would have to deal with quite nicely. has examples and docs.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list