Re: Python COM iterator

2007-04-19 Thread Steve Holden
Ross Ridge wrote: > Larry Bates wrote: >> I tested in VB and by golly it works! What is odd is that this looks >> NOTHING like what we got from the docs earlier. No GetEnumerator >> method, no MoveNext method. I'm glad it works, but I'm a little >> puzzled as to why it works. > > The documentio

Re: Python COM iterator

2007-04-19 Thread Ross Ridge
Larry Bates wrote: > I tested in VB and by golly it works! What is odd is that this looks > NOTHING like what we got from the docs earlier. No GetEnumerator > method, no MoveNext method. I'm glad it works, but I'm a little > puzzled as to why it works. The documention Carsten Haese referenced e

Re: Python COM iterator

2007-04-19 Thread Carsten Haese
On Thu, 2007-04-19 at 12:49 -0400, Steve Holden wrote: > Larry Bates wrote: > > Carsten Haese wrote: > [iterative acess to COM objects] > > I tested in VB and by golly it works! What is odd is that this looks > > NOTHING like what we got from the docs earlier. No GetEnumerator > > method, no Move

Re: Python COM iterator

2007-04-19 Thread Steve Holden
Larry Bates wrote: > Carsten Haese wrote: [iterative acess to COM objects] > I tested in VB and by golly it works! What is odd is that this looks > NOTHING like what we got from the docs earlier. No GetEnumerator > method, no MoveNext method. I'm glad it works, but I'm a little > puzzled as to w

Re: Python COM iterator

2007-04-19 Thread Larry Bates
Carsten Haese wrote: >> [...] >>> On Tue, 2007-04-17 at 16:54 -0500, Larry Bates wrote: Does anyone know if there is a way to make a Python COM object act like a proper iterator in VB/Delphi? >> [...] > > After more googling, staring at win32com's code, and a fair bit of trial > and erro

Re: Python COM iterator

2007-04-18 Thread Carsten Haese
>[...] > > On Tue, 2007-04-17 at 16:54 -0500, Larry Bates wrote: > >> Does anyone know if there is a way to make a Python COM object > >> act like a proper iterator in VB/Delphi? >[...] After more googling, staring at win32com's code, and a fair bit of trial and error, I've come up with the follow

Re: Python COM iterator

2007-04-18 Thread Larry Bates
Carsten Haese wrote: > On Tue, 2007-04-17 at 16:54 -0500, Larry Bates wrote: >> Does anyone know if there is a way to make a Python COM object >> act like a proper iterator in VB/Delphi? > > I don't use COM, VB, or Delphi, but Google turned up these two > references: > http://msdn.microsoft.com/li

Re: Python COM iterator

2007-04-17 Thread Carsten Haese
On Tue, 2007-04-17 at 16:54 -0500, Larry Bates wrote: > Does anyone know if there is a way to make a Python COM object > act like a proper iterator in VB/Delphi? I don't use COM, VB, or Delphi, but Google turned up these two references: http://msdn.microsoft.com/library/default.asp?url=/library/en

Python COM iterator

2007-04-17 Thread Larry Bates
Does anyone know if there is a way to make a Python COM object act like a proper iterator in VB/Delphi? Example: Python COM object class foo: _public_methods_=['next'] def __init__(self): self.numbers=[1,2,3,4,5,6,7,8] def next(self): try: return self.number