【发布时间】:2020-08-18 11:16:52
【问题描述】:
我想将一个 python 程序变成一个 Windows 10 或 7 应用程序,可以在没有安装 python 的 Windows PC 上运行。我使用 python 3.7。
我认为这并不重要,但以防万一,这是我的代码:
from tkinter.messagebox import showwarning
from tkinter import *
import schedule
from win10toast import ToastNotifier
toaster = ToastNotifier()
root = Tk()
root.withdraw()
def shownotification():
toaster.show_toast("Screen Time",
"Take a break for 20 seconds",
duration=5)
schedule.every(20).minutes.do(shownotification)
while True:
schedule.run_pending()
【问题讨论】:
-
您用
py2exe标记了您的问题。你试过使用那个程序吗?还是别的什么? -
搜索 python to exe - 大量的howtos
-
我试过py2exe但效果不佳
标签: python python-3.x windows executable py2exe