'Internal function.'

def _configure(self, cmd, cnf, kw):

    if kw:
        cnf = _cnfmerge((cnf, kw))
    elif cnf:
        cnf = _cnfmerge(cnf)
    if (cnf is None):
        return self._getconfigure(_flatten((self._w, cmd)))
    if (type(cnf) is StringType):
        return self._getconfigure1(_flatten((self._w, cmd, ('-' + cnf))))
    self.tk.call((_flatten((self._w, cmd)) + self._options(cnf)))
