Tim Golden > Python Stuff > Win32 How Do I...? > Lock my workstation
The requirement: Lock a WinNT+ workstation (so you have to Ctrl-Alt-Del to continue using it).
This is just so simple it hardly merits a page to itself. You use the LockWorkStation function!
import ctypes ctypes.windll.user32.LockWorkStation ()