Win32com curiousity #2: PythonWin code completion

Michel Orengo morganea at bellatlantic.net
Thu Jul 6 18:08:27 EDT 2000


When you run makepy, you actually create a file (see in
python\win32com\gen_py) that defines the ADO classes and their
methods/properties (that is true for any other COM classes you run makepy
on). The Dispatch is smart enough to get this file instead of a dynamic
loading. This is why you were able to see all methods/properties after
running makepy.

Also, because you use Fields, MoveNext and Open as methods on the 'rs'
instance, PythonWin used them when constructing its class browser...and
therefore the list of attributes you find in the list for code completion.

Michel


<mksql at my-deja.com> wrote in message news:8k2q2c$fg2$1 at nnrp1.deja.com...
> When I first start PythonWin, the code completion feature seems to only
> partially function, until I save the source file at least once. This is
> when opening an existing source file, and after I have run makepy on
> the ADO libraries. For example, in a program with a recordset defines
> with:
>
>     rs = win32com.client.Dispatch('ADODB.Recordset')
>
> typing 'rs.' brings up a partial list of methods/properties - Fields,
> MoveNext, Open
>
> After saving the program, 'rs.' brings up the entire expected list.
> Interestingly, the 3 keywords above are method/properties that already
> exist in preceeding code.
>
> Am I missing a configuration step?
>
>
>
>
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.





More information about the Python-list mailing list