[Tutor] Sleep

Marc Tompkins marc.tompkins at gmail.com
Thu Oct 8 01:22:36 CEST 2009

On Wed, Oct 7, 2009 at 4:01 PM, Hristos Giannopoulos
<sotsirh194 at gmail.com>wrote:

> Is it possible for a python script to make a windows computer sleep or wake
> from sleep? Preferably in windows?

I think your best bet for controlling Windows power management with Python
will be the pywin32 module, at http://sourceforge.net/projects/pywin32/
It wraps the Win32 API so that Python scripts can call it.
You'll find there's not much documentation for pywin32, but you won't need
much, because what you really need to know is how to use the API to do what
you want.

Just Google for that - there's a huge body of information available on the
Web about using the Win32 API - then use pywin32 to wrap whatever API call
you find.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20091007/8485c64b/attachment.htm>

More information about the Tutor mailing list