Tim Golden wrote:
This -- just in case you haven't come across the expression --
is called monkey-patching. It's a slightly general-purpose
example of it, but it's something which is usefully easy
to do in Python. (Consequently, it's easy to abuse but...)
Ah right - nice to know my dodgy hack
[Tim Golden]
Presumably, then, if the original COM class exposed,
say, a .GetGroups method which returned a list of
groups, each of which you wanted to wrap, in this
implementation, you'd add a .MyGetGroups method which
called the original and wrapped the result?
[Ross McKerchar]
It's
A few months ago I posted asking for some advice on ways to extend
classes provided by com objects.
Primarily I was keen to make a com library that I work with a lot
(Notes/Domino if anyone's interested) nicer and more pythonic to use.
I've spent a good few hours bashing away and have found
Ross McKerchar wrote:
I've spent a good few hours bashing away and have found two ways which
appear to work with my simplistic test suite. However I'm not
particularly comfortable with either of them (the black magic I'm using
is all a bit new to me). Consequently if anyone has time to have
Could somebody please confirm that my objectives below are neither 1)
Reinventing the wheel or 2) Attempting something that has deliberately
_not_ been done by someone far wiser than me.
Put simply I want to extend a com object, which, if I understand
correctly is not possible in the normal