[wingide-users] Re: Using Wing IDE with IronPython - autocomplete
for .NET objects (PI file generator)
Jimmie Houchin
jlhouchin at gmail.com
Thu Apr 30 10:58:07 MDT 2009
Michael Foord wrote:
> Jimmie Houchin wrote:
>> This sounds great. I am new to both IronPython, WingIDE and Windows
>> development in general.
>>
>> One of the disappointing things with WingIDE for me is the total
>> absence of autocompletion of .NET imports
>
> Which is what my script provides. The autocomplete for .NET now in Wing
> is pretty awesome. Once I've added method return type hints it will be
> even better.
>
>> and also the DLL Assembly References I've added to access the
>> libraries my app requires.
>
> What do you mean by this?
>
> The *correct* way to do this with IronPython is by calling
> clr.AddReference yourself.
Yes, I understand.
In my Python script which I am editing in WingIDE I have:
import clr
clr.AddReferenceToFile('interop.mylibrary.dll')
import interop.mylibrary as mylibrary
mylibrary.AutoCompleteDoesNotHappenHere
actually this also is true:
clr.AutoCompleteDoesNotHappenHere
All of the above works great in the IronPython interpreter shell.
>> Unfortunately, for most of what I would like, I believe it would
>> require WingIDE to support the use of IronPython. Is this accurate?
>
> What do you mean by 'for most of what I would like'? Anything in
> addition to the two points above?
No, I am not a WingIDE power-user yet. I am wanting to learn. I've spent
most of my time with Squeak Smalltalk so I do love the power of a good
IDE. But a couple of apps I am writing directly use .NET and also COM
DLLs. IronPython seemed like the best option for writing those apps. One
I have got permission to use ASP.NET MVC and IronPython. Yay! no VB. :)
Primarily at this point what I am missing and not seeing is the
autocompletion for the imported "mylibrary" and "clr" above. I currently
have neither.
I will honestly admit I could easily be doing something wrong. Or I did
not change a preference or add your PI files or something. I would be
happy for that to be the case.
>> And if WingIDE did support the use of IronPython would it make what
>> you are doing easier or possibly unnecessary?
>
> The PI file mechanism is how Wing provides autocomplete - I've just made
> it work for .NET types, so this *is* Wing supporting IronPython. You can
> use Wing scripting to integrate other tools into Wing - see the example
> script I provided for running the current file with IronPython.
Ok, I understand. I need to see how to use your work here. I have only
just yesterday downloaded WingIDE to try. So this is all new to me.
> You might also want to integrate the IronPython debugger that Harry
> Pierson has been working on:
>
> http://ironpython-urls.blogspot.com/2009/04/further-adventures-of-debugger.html
Thanks. I give that a look.
Jimmie
More information about the wingide-users
mailing list