Intellisense for custom types in Iron Python

I am just starting to play with IronPython and I am having a hard time using it with custom types created in C #. I can get IronPython to load in assemblies from C # classes, but I am struggling without intellisense help. If I have a class in C # as defined below, how can I make it so that IronPython can see the methods / properties available to it?

public class Person
{
    public string Name { get; set; }
    public int Age{ get; set; }
    public double Weight{ get; set; }
    public double Height { get; set; }

    public double CalculateBMI()
    {
        return Weight/Math.Pow(Height, 2);
    }
}

      

In Iron python, I would cast a Person object like this:

newPerson = Person()
newPerson.Name = 'John'
newPerson.Age = 25
newPerson.Weight = 75
newPerson.Height = 1.70
newPerson.CalculateBMI()

      

The thing that annoys me is what I want to say

newPerson = Person()

      

And then be able to see all the methods and properties associated with the person object when I type:

newPerson.

      

Anyone have any ideas if this can be done?

+2


a source to share


1 answer


If you want to do it from an editor / IDE, IronPython Tools for Visual Studio has this capability (and more). If you don't have VS 2010 Pro, you can install it in the Integrated Shell .



If you want to do it from the console, I don't think it's possible.

+2


a source







All Articles