Re: [python-win32] wrapping objects from a COM server

2007-01-24 Thread Jonathan LaCour
Mark Hammond wrote: >> Really? This is not my experience. I am using whatever the default >> policy is on all of my objects, and a test case very much like my >> "Person" and "Title" example below fails unless I loop through the >> `titles` attribute of my Person instances and manually wrap the

Re: [python-win32] wrapping objects from a COM server

2007-01-24 Thread Mark Hammond
> >> Well, thats basically what I am doing now, but these object > >> structures that are returned can be arbitrarily complex, with lists > >> of objects that contain other kinds of objects, which have lists > >> of even more objects. Having to walk through arbitrary object > >> structures and loo

Re: [python-win32] wrapping objects from a COM server

2007-01-24 Thread Jonathan LaCour
Mark Hammond wrote: >> Well, thats basically what I am doing now, but these object >> structures that are returned can be arbitrarily complex, with lists >> of objects that contain other kinds of objects, which have lists >> of even more objects. Having to walk through arbitrary object >> structu

Re: [python-win32] wrapping objects from a COM server

2007-01-23 Thread Mark Hammond
> Mark Hammond wrote: > > >> Is there a way that I can automatically have this happen for me, so > >> that `win32com.server.util.wrap` will automatically be > called on the > >> way out of a method? > > > > It should be possible to have your _dynamic_ method do this for you? > > Instead of returnin

Re: [python-win32] wrapping objects from a COM server

2007-01-23 Thread Jonathan LaCour
Mark Hammond wrote: >> Is there a way that I can automatically have this happen for me, so >> that `win32com.server.util.wrap` will automatically be called on the >> way out of a method? > > It should be possible to have your _dynamic_ method do this for you? > Instead of returning the result item

Re: [python-win32] wrapping objects from a COM server

2007-01-23 Thread Mark Hammond
> Is there a way that I can automatically have this happen for me, so > that `win32com.server.util.wrap` will automatically be called on the > way out of a method? It should be possible to have your _dynamic_ method do this for you? Instead of returning the result item, introspect what is returned

[python-win32] wrapping objects from a COM server

2007-01-23 Thread Jonathan LaCour
I am writing my first COM Server using the wonderful win32 extensions, and am running into a bit of an annoyance. My COM Server is using a dynamic policy by implementing `_dynamic_` to act as a proxy to some Python modules, very similarly to the Python String wrapper described in the Python Progra