Tim Golden wrote: > As you will realise if you've looked at my code, I'm > using a delegation model. (Sounds grand, doesn't it: > a delegation model!) Which basically means I keep > a copy of the WMI COM object inside my own class and > proxy things across where needed. > > Can't see why you couldn't do this with any other > kind of COM object in the same way. Might not be > the quickest technique -- you're adding another > layer to sthg which already has a couple -- but > maybe that's not a problem. >
Yep, my plan was to wrap the class and use some getattr/setattr magic to decide when to delegate my requests to the com object (a delegation model does sound like a better way of putting it :). Efficiency is not a huge problem for the application I have in mind. My main worry about attempting it was that there might already a simple elegant way of doing it, or, a good reason why I shouldn't. I'd have thought the ability to extend com objects would be commonly required and hence addressed before but obviously not. Wont manage to sort something out till well into the new year but I'll post a link to it when I'm done - I figure what I come up with should be applicable to any and all com objects. thanks, -ross _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32