Intellisense with custom interpreter

Mar 23, 2012 at 11:45 AM


I have a custom build IronPython interpreter which basically constitutes of a lightly modified IronPython's Console.cs (adding references to our own DLLs) and a compressed (zipped) Python Standard library.

I can't get Intellisense work with anything except the built-ins (sys, math, etc) and one python package of mine installed in site-packages. Neither .NET System nor Python's std lib are visible to Intellisense and neither does our dlls. The scripts run fine in "Python Interactive" (Shift-Alt-F5).

My interpreter is configured as Standard and the test project as Standard Launcher.

I had read old discussions regarding Intellisense but I'm really lost here, I can't even figure out if what I'm doing is supported or not.



Mar 23, 2012 at 4:50 PM

To get intellisense for the built-ins you might be able to go to Tools->Options->Python Tools->Interpreter Options, select your interpreter, and then do Generate Completion Database. 

For the .NET intellisense you need to be configured to use an IronPython interpreter.  Currently there's no way to manually configure this and we only discover that IronPython is installed by looking for one reg key (HKLM\SOFTWARE\IronPython\2.7\InstallPath). 

You could either set that key to point at your interpreter and then the normal IronPython interpreter would use your custom interpreter.  Or you could open a feature request so we can pick up custom IronPython interpreters (For example by looking for an InstallPath in HKLM\IronPython\*\....) or add some way to manually configure an IronPython interpreter.  And of course a patch would be welcome too :)

Mar 23, 2012 at 7:06 PM

I see...

It seems to be two problems here, the one you mentioned about the registry and the standard library that I'm shipping zipped with my interpreter. I'll play a bit with the registry to try get pytools recognize the interpreter. If I can find a way to patch it I'll post it.

Regarding the std lib I did generate the completion db (I've forgot to said that in my OP) but I'm afraid that the .py files in the zip weren't indexed. I've added the zip file to the ScriptEngine.SetSearchPaths in the interpreter but it seems that pytools ignores it.




Mar 23, 2012 at 8:02 PM

Yeah, currently we don't have any support for looking inside of zip files for analys although it's something we should probably support.  Could you open a feature request?

Mar 24, 2012 at 12:22 PM

Created issues 681 (zip import) and 682 (registry key).

Can any admin change their type to "Feature Request", please?