【发布时间】:2010-09-07 21:57:42
【问题描述】:
我编写了一个小 Python 脚本,它会弹出一个消息框,其中包含在命令行中传递的文本。我只想在之前调用的窗口未打开时弹出它。
from Tkinter import *
import tkMessageBox
root = Tk()
root.withdraw()
# TODO not if a window with this title exists
tkMessageBox.showinfo("Key you!", " ".join(sys.argv[1:]))
知道如何检查吗?
【问题讨论】: