[core python programming]chapter 7 programming MS office

excel.pyw会有问题,解决如下:

因为python3x中没有tkMessageBox模块,Tkinter改成了tkinter
你可以查看你的py当前支持的模块。
在交互式命令行下输入
>>> help()
>>> modules

前三行改为:

1 from tkinter import Tk
2 from time import sleep
3 from tkinter.messagebox import showwarning
原文地址:https://www.cnblogs.com/nbalive2001/p/4494424.html