- くだすれPython(超初心者用) その29©2ch.net
137 :デフォルトの名無しさん[sage]:2016/03/16(水) 10:59:23.54 ID:q/6RNJn3 - GUIから文字列を入力させたいんだけど、
from tkinter.simpledialog import askstring res = askstring("title", "message") print(res) こうすると、AttributeError: 'NoneType' object has no attribute 'winfo_viewable' というエラーになる。 この前に import tkinter root = tkinter.Tk() を入れるとちゃんと動作はするけれど、いらないウインドウが余計に一つ現れる。 なんとかならないですか? 環境は、Windows7にPython 3.5.1 :: Anaconda 2.5.0 (64-bit)です。
|
|