[IronPython] IronPython Tools for VS2010 Questions
Bill Dines
wdines at longview.com
Thu Mar 31 12:00:45 CEST 2011
> 1. Intellisense/autocomplete will be really useful for our users. Can
> anyone tell me what should and shouldn't provide this capability. So
> far it seems that some System types provide it and Python Module
> Methods work as well but I'm not sure what else should work as it is a
> little buggy. For example is there any way to get intellisense from
3rd party c# dll's?
>>It will work with any Python code that you have loaded into your
project or with any .NET assemblies which can be >>successfully loaded
by Visual Studio process and which there are clr.AddReference calls.
Likely that means the >>assemblies will need to be in the GAC for them
to be loaded. Once we see the clr.AddReference call you should be
>>able to get completion on their namespaces and types.
I wasn't aware you could put Silverlight assemblies in the GAC, but it
seems you can! It does work but there is still a problem because if you
use clr.AddReference() the code fails as Python can't load the assembly
at runtime. I've been using clr.AddReferenceToFile() which works at
runtime (so long as I use the technique described in question 2 to get
the .dll in the xap) but doesn't give Intellisense at design time :(
>
> 2. Using a Python Project and Chiron, what is the best way to include
> 3rd party .dlls in the xap? At the moment I've copied the .dlls to
> the IP Silverlight\bin folder and added them to the "assemblies"
> attribute of IPy's <Language\> tag in Chiron.exe.config. This works
> OK but means all .dlls will be included for all python projects. Is
> there a way of getting this to work for each project individually
> without the users having to do anything manually (I want to create
> project templates that they can be up and running without doing any
config themselves).
> Alternatively could the .dlls be downloaded from outside the xap e.g.
> from another .xap or .slvx?
>>I don't think there's a specific feature here. If you'd like to see
this in PTVS which Jeff mentioned then you could >>open a feature
request over at pytools.codeplex.com.
I will do that. It seems that these things are all related. You need
to be able to add a reference to a .dll, get intellisense from it and
have it in the .xap so it's available at runtime. It's basic
Silverlight stuff that really should be there I think.
More information about the Ironpython-users
mailing list