[python-win32] Re: Code help

Roger Upole rwupole at msn.com
Sun Apr 9 12:54:32 CEST 2006


Aleksandar Cikota wrote:

> Python code:
> import win32com.client
> FM = win32com.client.Dispatch('FocusMax.FocusControl')
> FM.Focus

Use FM.Focus().
You need the parens to actually call the function.
In Python, FM.Focus just returns a reference to the Focus
method rather than calling the method.

    hth
        Roger



More information about the Python-win32 mailing list