A comprehensive Python automation toolkit for Windows
Project description
pyautomatic
python模块
模块列表
- windows
- rs1
- pt (print的彩色输出)
- math
- download
- [] image
安装
pip install pyautomatic
使用
from pyautomatic import windows
# 获取系统信息
print(windows.get_system_info())
# 获取进程列表
print(windows.get_process_list())
# 显示通知
windows.show_notification("标题", "内容")
# 显示toast通知
windows.show_toast_notification("标题", "内容")
# 判断是否为管理员权限
print(windows.is_admin())
# 以管理员权限运行
windows.run_as_admin()
# 获取文件属性
print(windows.get_file_properties("C:\\Windows\\System32\\notepad.exe"))
# 格式化文件大小
print(windows._format_file_size(1024))
# 创建快捷方式
windows.create_shortcut("C:\\Windows\\System32\\notepad.exe", "C:\\Users\\Public\\Desktop\\Notepad.lnk", "Notepad快捷方式", "", "C:\\Windows\\System32", "C:\\Windows\\System32\\notepad.exe")
# 获取注册表值
print(windows.get_registry_value("HKEY_LOCAL_MACHINE", "SOFTWARE\\Microsoft\\Windows\\CurrentVersion", "ProgramFilesDir"))
# 设置注册表值
windows.set_registry_value("HKEY_LOCAL_MACHINE", "SOFTWARE\\Microsoft\\Windows\\CurrentVersion", "ProgramFilesDir", "REG_SZ", "C:\\Program Files")
# 获取系统启动时间
print(windows.get_system_uptime())
# 获取磁盘使用情况
print(windows.get_disk_usage())
# 终止进程
windows.terminate_process(1234)
# 运行命令
print(windows.run_command("ipconfig"))
# 锁定工作站
windows.lock_workstation()
# 设置壁纸
windows.set_wallpaper("C:\\Users\\Public\\Pictures\\Sample Pictures\\Koala.jpg")
# 获取活动窗口
print(windows.get_active_window())
# 关机
windows.system_shutdown()
# 重启
windows.system_shutdown(reboot=True)
# 定时关机
windows.system_shutdown(timer=60) # 60秒后关机
还有许多功能,请查看源代码。
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyautomatic-1.0.1.tar.gz
(4.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyautomatic-1.0.1.tar.gz.
File metadata
- Download URL: pyautomatic-1.0.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43c126c6583b8d94c38cd2e3757d58c7b7513e966e81497fc4e13e1f498cd6f8
|
|
| MD5 |
d37f90f67c78d815a9b748eefea880b3
|
|
| BLAKE2b-256 |
603a181c9d053f364c031ffb441f15c56e98dcab2a566d66dc09f179d2d1a151
|
File details
Details for the file pyautomatic-1.0.1-py3-none-any.whl.
File metadata
- Download URL: pyautomatic-1.0.1-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c95e9d80302d085da15218df69ca4215d81b75e5038f931287662b2db5134bf8
|
|
| MD5 |
26d2272efc486f7619dbac847c7b1947
|
|
| BLAKE2b-256 |
b7b99dc234952277b373a7cf858e6f53008221a2ecdc95b492fcdafe7c42e9f8
|