Python.TkInter

Tkinter update_idletasks method, to make sure pending draw operations (like the status bar update) are carried out immediately.

If you need to explicitly specify a color, you can use a string with the following format: #RRGGBB

RR, GG, BB are hexadecimal representations of the red, green and blue values, respectively. The following sample shows how you can convert a color 3-tuple to a Tk color specification: tk_rgb = "#%02x%02x%02x" % (128, 192, 200) style of sprint %表示下一个变量 If the % is followed by a decimal number and a $, as in "%2$d", then the value to convert is not taken from the next sequential argument. Instead, it is taken from the argument indicated by the number, where 1 corresponds to the first arg.

0 Specifies that the number should be padded on the left with zeroes instead of spaces.

2表示二位,就像.2表示小数点后2位一样。 x or X Convert integer to unsigned hexadecimal string, using digits "0123456789abcdef" for x and "0123456789ABCDEF" for X).

原来END不是list的关键字,而是tkinter的内置函数!

函数和方法的区别?   不让容器适合内容大小: windowBox.pack_propagate(0)