Internal function.
(self, cnf, kw = None)
| 1541 | return ws |
| 1542 | |
| 1543 | def _options(self, cnf, kw = None): |
| 1544 | """Internal function.""" |
| 1545 | if kw: |
| 1546 | cnf = _cnfmerge((cnf, kw)) |
| 1547 | else: |
| 1548 | cnf = _cnfmerge(cnf) |
| 1549 | res = () |
| 1550 | for k, v in cnf.items(): |
| 1551 | if v is not None: |
| 1552 | if k[-1] == '_': k = k[:-1] |
| 1553 | if callable(v): |
| 1554 | v = self._register(v) |
| 1555 | elif isinstance(v, (tuple, list)): |
| 1556 | nv = [] |
| 1557 | for item in v: |
| 1558 | if isinstance(item, int): |
| 1559 | nv.append(str(item)) |
| 1560 | elif isinstance(item, str): |
| 1561 | nv.append(_stringify(item)) |
| 1562 | else: |
| 1563 | break |
| 1564 | else: |
| 1565 | v = ' '.join(nv) |
| 1566 | res = res + ('-'+k, v) |
| 1567 | return res |
| 1568 | |
| 1569 | def nametowidget(self, name): |
| 1570 | """Return the Tkinter instance of a widget identified by |
no test coverage detected