pythonware.com products ::: library ::: search ::: daily Python-URL!

Library

An Introduction to Tkinter

Tkinter Interface Methods :::

A Django site.
   

Tkinter Interface Methods

Back   Next   

 Tkinter Interface Methods

The following methods are used by Tkinter's inner workings. Don't use these unless you know exactly what you are doing, and why you should do that.

  getboolean

getboolean(s). Convert a string to a boolean (flag) value, using Tcl's conventions.

 getdouble

getdouble(s). Convert a string to a floating point value, using Tcl's conventions. In practice, this is equivalent to float and string.atof.

 getint

getint(s). Convert a string to an integer point value, using Tcl's conventions. In practice, this is equivalent to int and string.atoi.

 register

register(callback). Register a Tcl to Python callback. Returns the name of a Tcl wrapper procedure. When that procedure is called from a Tcl program, it will call the corresponding Python function with the arguments given to the Tcl procedure. Values returned from the Python callback are converted to strings, and returned to the Tcl program.

  winfo_atom

winfo_atom(string). Map the given to a unique integer. Everytime you call this method with the same string, the same integer will be returned.

  winfo_atomname

winfo_atomname(id). Return the string corresponding to the given integer (obtained by a call to winfo_atom). If the integer isn't in use, Tkinter raises a TclError exception. Note that Tkinter predefines a bunch of integers (typically 1-80 or so). If you're curious, you can use winfo_atomname to find out what they are used for.

Back   Next