是否可以将except IndexError
放入TKinter
模块(Spinbox
,Listbox
),我试图向所有用户显示CSV
文件通过显示某个行和列,每当我运行程序时,我得到IndexError
,是否有办法让Tkinter widget
except
出错并显示其他用户?
CSV
文件尚未填满。
CompareSpinbox = Spinbox(frame_5, values=(data_dictionary[0][0], data_dictionary[1][0], data_dictionary[2][0],
data_dictionary[3][0], data_dictionary[4][0], data_dictionary[5][0], data_dictionary[6][0], data_dictionary[7][0],
data_dictionary[8][0], data_dictionary[9][0], data_dictionary[10][0], data_dictionary[11][0], data_dictionary[12][0],
data_dictionary[13][0], data_dictionary[14][0], data_dictionary[15][0], data_dictionary[16][0], data_dictionary[17][0],
data_dictionary[18][0], data_dictionary[19][0], data_dictionary[20][0]), textvariable=__ComapreUsrB)
CompareSpinbox.grid(row=2, column=0)