'Internal function. Sets up information about children.'

def _setup(self, master, cnf):

    if _support_default_root:
        global _default_root
        if (not master):
            if (not _default_root):
                _default_root = Tk()
            master = _default_root
    self.master = master
    self.tk = master.tk
    name = None
    if ('name' in cnf):
        name = cnf['name']
        del cnf['name']
    if (not name):
        name = repr(id(self))
    self._name = name
    if (master._w == '.'):
        self._w = ('.' + name)
    else:
        self._w = ((master._w + '.') + name)
    self.children = {}
    if (self._name in self.master.children):
        self.master.children[self._name].destroy()
    self.master.children[self._name] = self
