[IronPython] custom ConfigurationSection in IronPython

Jason Ferrara jason.ferrara at jacquette.com
Fri Sep 1 18:34:45 CEST 2006


On Aug 31, 2006, at 4:00 PM, Dino Viehland wrote:

> The Item property is the default indexer, so you should be able to  
> access it using foo[index].
>
> As for your other question - Martin looked into this but I didn't  
> see a response from him...  The problem seems to be that we don't  
> define a parameterless constructor that the configuration section  
> can call.  The reason for that is that our objects actually need to  
> receive a DynamicType object which represents the class - without  
> this we wouldn't be able to know your type was MySettings.   
> Unfortunately I think this might make it impossible for you to  
> define this class in IronPython.  You could define a stub in C#  
> that calls into your Python using the engine APIs but that might be  
> more work than it's worth.
>

If I wanted to write a stub in C#, how do I get access to a  
PythonEngine that represents the python environment that called the  
C# code? Just calling IronPython.Hosting.PythonEngine() seems to get  
me a new environment.



More information about the Ironpython-users mailing list