站长资源脚本专栏
python调用windows api锁定计算机示例
简介调用Windows API锁定计算机 本来想用Python32直接调用,可是没有发现Python32有Windows API LockWorkStation(); 因此,就直接调用Windows DLL了 复制代码 代码如下:#!/usr/bin/env python#-*- coding:c
调用Windows API锁定计算机
本来想用Python32直接调用,可是没有发现Python32有Windows API LockWorkStation();
因此,就直接调用Windows DLL了
复制代码 代码如下:
#!/usr/bin/env python
#-*- coding:cp936 -*-
"调用WindowAPI锁定计算机"
import ctypes;
dll = ctypes.WinDLL('user32.dll');
dll.LockWorkStation();