Skip to main content

A comprehensive Python automation toolkit for Windows

Project description

pyautomatic

python模块

模块列表

  • windows
  • rs1
  • pt (print的彩色输出)
  • math
  • download
  • [] mail
  • [] 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.2.tar.gz (24.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyautomatic-1.0.2-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

Details for the file pyautomatic-1.0.2.tar.gz.

File metadata

  • Download URL: pyautomatic-1.0.2.tar.gz
  • Upload date:
  • Size: 24.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pyautomatic-1.0.2.tar.gz
Algorithm Hash digest
SHA256 33a36318fc9c00b46089748c9e3d180a7a11b5dd3689e7306c21d72b1b0281ee
MD5 c4955bce709820dd3bfebfc6044d461a
BLAKE2b-256 2615db1ebdf7ab68217836d95a22e1dc279a056c4ae843ee210cd8c1d43bb667

See more details on using hashes here.

File details

Details for the file pyautomatic-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyautomatic-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for pyautomatic-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 817c0975b7c5fa1bae6c88a261c5cd6d7d0df73be293135696bd33922610f368
MD5 0fc24686df94dcd71273fe873414babd
BLAKE2b-256 a9ab2dc769768593253591208941b7476c2bc07c62c52f786809ffdd8bcce38c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page