COM bites - help please
Gordon McMillan
gmcm at hypernet.com
Fri Jul 23 09:26:52 EDT 1999
Karl Putland is frustrated:
> I've got a couple of pyCOM things that are kicking my @$$!
Bill Tutt got most of 'em...
> 2. A computed attribute in __getattr__ does not want to be accessed
> through com. It is in the _public_attrs_ list but produces the
> following error when attempting to access it.
Both you and the COM support are playing attribute games, and not
agreeing on how the game is played. Can you expose Get methods to
COM, and play your games there? That way, COM will find something
real (a method object), and you can still do lazy evalutaion.
BTW, I find it very helpful to use a separate (wrapper) object:
class RealWork:
...
class COMRealWorkWrap:
_public_methods_ = [ ... ]
def __init__(self, real_obj):
...
That also means I can put all my Unicode conversion in one place.
- Gordon
More information about the Python-list
mailing list