(fromClass, toClass, toPart, exclude = ())
| 304 | 'self.%(attribute)s.%(method)s(*args, **kw)') |
| 305 | |
| 306 | def __forwardmethods(fromClass, toClass, toPart, exclude = ()): |
| 307 | ### MANY CHANGES ### |
| 308 | _dict_1 = {} |
| 309 | __methodDict(toClass, _dict_1) |
| 310 | _dict = {} |
| 311 | mfc = __methods(fromClass) |
| 312 | for ex in _dict_1.keys(): |
| 313 | if ex[:1] == '_' or ex[-1:] == '_' or ex in exclude or ex in mfc: |
| 314 | pass |
| 315 | else: |
| 316 | _dict[ex] = _dict_1[ex] |
| 317 | |
| 318 | for method, func in _dict.items(): |
| 319 | d = {'method': method, 'func': func} |
| 320 | if isinstance(toPart, str): |
| 321 | execString = \ |
| 322 | __stringBody % {'method' : method, 'attribute' : toPart} |
| 323 | exec(execString, d) |
| 324 | setattr(fromClass, method, d[method]) ### NEWU! |
| 325 | |
| 326 | |
| 327 | class ScrolledCanvas(TK.Frame): |
no test coverage detected
searching dependent graphs…