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

Jacek Pliszka jacek.pliszka at gmail.com
Tue Oct 21 21:09:15 CEST 2008


Hi!

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:
                   raise
               return self.__repr__()

to class CDispatch in  win32com/client/dynamic.py   ?

It would help me a lot - I need unicode data from objects.

Or is there a way to get them ?

Thanks for any help,

Jacek Pliszka


More information about the python-win32 mailing list