ここで非常に単純な問題が発生したと思われますが、何が問題なのかわかりません。次のコード:
import Tkinter as Tk
Tk.tkMessageBox.showerror(message='some error')
与えます:
AttributeError: 'module' object has no attribute 'tkMessageBox'
ウィジェット (ボタン、エントリなど) は問題なく動作します。インタラクティブに同じ結果が得られます。また、次のこともできます。
>>> import Tkinter as Tk
>>> print Tkinter
<module 'Tkinter' from 'C:\Python26\lib\lib-tk\Tkinter.pyc'>
tkMessageBox.pyはC:\Python26\Lib\lib-tk にあります。Lib/lib の大文字と小文字が異なるのはなぜですか?!
これは Windows で Python 2.6 を使用しており、Tkinter._test() を実行するとバージョン 8.5 がレポートされます