Re: [python-win32] Feature request: adding unicode method to CDispatch

2008-10-21 Thread Tim Roberts
Jacek Pliszka wrote: Would it be a problem to add __unicode__ method like this: def __unicode__(self): try: return unicode(self.__call__()) except pythoncom.com_error, details: if details[0] not in ERRORS_BAD_CONTEXT:

Re: [python-win32] Feature request: adding unicode method to CDispatch

2008-10-21 Thread Tim Roberts
Jacek Pliszka wrote: Hi! I have something like this: wrd=Dispatch(Word.Application) doc=wrd.Documents.Open('test.doc') for j in doc.Tables: s=unicode(j) ... here I do a few searches on the date inside the table How can I do it without the method I mentioned ? I use it here