[wingide-users] Name completion on .NET and COM objects

Wikström Sven sven.wikstrom at scania.com
Mon Oct 13 01:08:46 MDT 2008


Thanks for the response.

I understand that it cannot work in the main editor window.
But it does not work in the interactive shell nor the probe either, for me at least.

Behaviour in Wings interactive shell:
>>>> import win32com.client
>>>> excel = win32com.client.Dispatch("Excel.Application")
>>>> excel.XXXXXX

Where "XXXXXX" is just a completion list of low-level COM stuff. I do not get name completion for the actual Excel COM object's attributes as with Pythonwin.

Do I need a special setup?

We would love to use Wing as it seems to be THE Python editor. We deal with COM and .NET quite a lot so this is the last question mark.

Thanks again!


-----Original Message-----
From: Wingware Support [mailto:support at wingware.com] 
Sent: den 10 oktober 2008 17:52
To: Wikström Sven
Cc: wingide-users at wingware.com
Subject: Re: [wingide-users] Name completion on .NET and COM objects

Wikström Sven wrote:
> I have an issue with name completion on COM (win32com) and .NET 
> (Pythonnet) objects. Completion works on Pythonwin but not on Wing. 
> While Pythonwin lists all available attributes on these objects, Wing 
> only shows the COM attributes i.e not the COM objects own attributes. 
> Same applies to .NET object.
> Ex. for COM late binding:
>>>> import win32com.client
>>>> excel = win32com.client.Dispatch("Excel.Application")
>>>> # Pythonwin lists all available attributes when
>>>> # hitting the "." after "excel"
>>>> #  <here>
>>>> #    |
>>>> #    v
>>>> excel.Application()
> u'Microsoft Excel'
>>>> # Using Wing you only get what seems to be COM low-level stuff.
> Ex. .NET through Pythonnet
>>>> import clr
>>>> import System
>>>> # Pythonwin lets us e.g select Math and PI.
>>>> # Wing displays nothin...
>>>> System.Math.PI
> 3.1415926535897931

Is this in the editor or in either the interactive shell or debug probe? 
  It should work in the shell or probe, but it won't work in the editor 
because the editor relies on static analysis.



More information about the wingide-users mailing list