tokenize.detect_encoding()

tokenize.detect_encoding(readline) The detect_encoding() function is used to detect the encoding that should be used to decode a Python source file. It requires one argument, readline, in the same way as the tokenize() generator. It will call readline a maximum of twice, and return the encoding used (as a string) and a list of any lines (not decoded from bytes) it has read in. It detects the encoding from the presence of a UTF-8 BOM or an encoding cookie as specified in PEP 263. If both a BO

tkinter.ttk.Widget.instate()

instate(statespec, callback=None, *args, **kw) Test the widget’s state. If a callback is not specified, returns True if the widget state matches statespec and False otherwise. If callback is specified then it is called with args if widget state matches statespec.

tkinter.Widget.tk.createfilehandler()

Widget.tk.createfilehandler(file, mask, func) Registers the file handler callback function func. The file argument may either be an object with a fileno() method (such as a file or socket object), or an integer file descriptor. The mask argument is an ORed combination of any of the three constants below. The callback is called as follows: callback(file, mask)

tkinter.ttk.Widget

class tkinter.ttk.Widget identify(x, y) Returns the name of the element at position x y, or the empty string if the point does not lie within any element. x and y are pixel coordinates relative to the widget. instate(statespec, callback=None, *args, **kw) Test the widget’s state. If a callback is not specified, returns True if the widget state matches statespec and False otherwise. If callback is specified then it is called with args if widget state matches statespec. state(stat

tkinter.ttk.Treeview.yview()

yview(*args) Query or modify vertical position of the treeview.

tkinter.ttk.Widget.identify()

identify(x, y) Returns the name of the element at position x y, or the empty string if the point does not lie within any element. x and y are pixel coordinates relative to the widget.

tkinter.ttk.Widget.state()

state(statespec=None) Modify or inquire widget state. If statespec is specified, sets the widget state according to it and return a new statespec indicating which flags were changed. If statespec is not specified, returns the currently-enabled state flags.

tkinter.ttk.Treeview.xview()

xview(*args) Query or modify horizontal position of the treeview.

tkinter.ttk.Treeview.tag_has()

tag_has(tagname, item=None) If item is specified, returns 1 or 0 depending on whether the specified item has the given tagname. Otherwise, returns a list of all items that have the specified tag. Availability: Tk 8.6

tkinter.ttk.Treeview.tag_bind()

tag_bind(tagname, sequence=None, callback=None) Bind a callback for the given event sequence to the tag tagname. When an event is delivered to an item, the callbacks for each of the item’s tags option are called.