Lock Windows Screen GUI using python

Ian Kelly ian.g.kelly at gmail.com
Tue Jun 3 01:09:31 EDT 2014


On Mon, Jun 2, 2014 at 10:28 PM, Jaydeep Patil <patil.jay2009 at gmail.com> wrote:
> Dear all,
> Can we Lock Windows Screen GUI till program runs & unlock screen GUI when program finishes?

If you mean can you programmatically bring up the Windows lock screen,
then you can do this:

import ctypes
ctypes.windll.user32.LockWorkStation()

The only way to unlock it is for the user to log in.

If you mean something else, you'll have to be more specific.



More information about the Python-list mailing list