2024-06-10 18:24:54 发布
网友
你好啊 我正在用Tkinter(python)制作文本编辑器 所以我做了一个菜单,想知道如何调用一个函数来显示每个程序使用的windows另存为或打开的框。 例如,在记事本中,您可以单击“文件保存”,然后它会打开“windows保存”框。 我已经有菜单了,但如何打开保存框呢。 谢谢。
以下是来自http://www.daniweb.com/forums/thread39327.html的示例:
import tkFileDialog def open_it(): filename = tkFileDialog.askopenfilename() print filename # test def save_it(): filename = tkFileDialog.askopenfilename() print filename # test def save_as(): filename = tkFileDialog.asksaveasfilename() print filename # test
以下是来自http://www.daniweb.com/forums/thread39327.html的示例:
相关问题 更多 >
编程相关推荐