Windows: COM Automation problem with german VB localisation

Mark Hammond mhammond at skippinet.com.au
Wed Jun 14 15:25:54 EDT 2000


In article <8i7klg$23i$1 at desig-bs01-s04.adtranzsig.de>,
  "Dirk-Ulrich Heise" <hei at adtranzsig.de> wrote:

> The problem is: It's one of the MS programs where they localized
> the Visual Basic inside it, unfortunately (and needlessly) german
> Umlaute (ä,ö,ü)
> are part of the function names the MS program understands.
> Python chokes on them, it seems.
>
> Two questions:
> - Does anybody know a workaround?

You could try a getattr on the object - eg:

func = getattr(com_object, "whatever_with_funny_chars")
func(...)

> - Is there a more elegant way of finding out the COM interface
>   then recording the steps you want to automate with the
>   VB macro recorder?

You could try running makepy, and view the generated file.

Otherwise, look for one of the free COM viewers (or Pythonwin's COM
viewer, or (best of all) MS' COM viewer that comes with the SDK/VC)

Mark.


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list