def __forwardmethods(fromClass, toClass, toPart, exclude=()):
 _dict = {}
 __methodDict(toClass, _dict)
 for ex in _dict.keys():
  if ((ex[:1] == '_') or (ex[(-1):] == '_')):
   del _dict[ex]
 for ex in exclude:
  if _dict.has_key(ex):
   del _dict[ex]
 for ex in __methods(fromClass):
  if _dict.has_key(ex):
   del _dict[ex]
 for (method, func) in _dict.items():
  d = {'method': method, 'func': func}
  if (type(toPart) == types.StringType):
   execString = (__stringBody % {'method': method, 'attribute': toPart})
  exec execString in d
  fromClass.__dict__[method] = d[method]

def __forwardmethods ( fromClass , toClass , toPart , exclude = ( ) ) : _dict = { } __methodDict ( toClass , _dict ) for ex in _dict . keys ( ) : if ( ( ex [ : 1 ] == '_' ) or ( ex [ ( - 1 ) : ] == '_' ) ) : del _dict [ ex ] for ex in exclude : if _dict . has_key ( ex ) : del _dict [ ex ] for ex in __methods ( fromClass ) : if _dict . has_key ( ex ) : del _dict [ ex ] for ( method , func ) in _dict . items ( ) : d = { 'method' : method , 'func' : func } if ( type ( toPart ) == types . StringType ) : execString = ( __stringBody % { 'method' : method , 'attribute' : toPart } ) exec execString in d fromClass . __dict__ [ method ] = d [ method ]
helper functions for scrolled canvas .