See below.. On 5/16/07, Tim Golden <[EMAIL PROTECTED]> wrote: > I'm hoping that Mark Hammond will catch sight > of this thread and chip in. I'm guessing that > you're seeing some odd interaction between > the generated class/module and the COM object > properties. There's a sort of funniness where > properties can be methods... or not. > > Have you generated a proxy module for this? > If you haven't use makepy or EnsureDispatch > to generate and then look for the definition > of the result of the .Field method or > property or whatever. > > I'm groping in the dark a little, but I suspect > that the __str__ and __unicode__ magic methods > of whatever type that is are actually invoking > the default method/property of the underlying > object. > > To be concrete then: > > 1) Can you generate and post (probably to some webspace > somwhere) the proxy module? If you don't have easy > access to space, send it to me off-list and I can post > it up.
Oops.. I sent it to Mark in the most COMPRESSED form I could muster up. > <code> > from win32com.client import gencache > td = gencache.EnsureDispatch ("TDApiOle80.TDConnection.1") > print td.__module__ > </code> >>> from win32com.client import gencache >>> td = gencache.EnsureDispatch ("TDApiOle80.TDConnection.1") >>> print td.__module__ win32com.gen_py.F645BD06-E1B4-4E6A-82FB-E97D027FD456x0x1x0 > 2) What is the *type* of the value returned from > mybug.Field ("blah") ? > > <code> > import win32com.client > td = win32com.client.Dispatch("TDApiOle80.TDConnection.1") > td.InitConnectionEx( "http://myserver.com:8080/qcbin/" ) > td.ConnectProjectEx( > "TM_PLAY_AREA", > "TM_PlayArea", > "user", > "passwd" > ) > bfact = td.BugFactory > mybug=bfact.Item(22) > fields = mybug.Field("BG_DESCRIPTION") > print fields.__class__ > print type (fields) > > </code> >>> bfact = td.BugFactory >>> mybug=bfact.Item(22) >>> fields = mybug.Field("BG_DESCRIPTION") >>> print fields.__class__ <type 'unicode'> >>> print type (fields) <type 'unicode'> _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32