IronPython Dll

Jul 15, 2008 at 2:10 AM
I have a class library I created in IronPython Studio, I wanted to then take that dll and use it in a C# project, I think I'd need IronPython still somehow, but I honestly can't figure out how to do it, I've read a lot, I've imported the dll into my C# project, I can see the functions and classes I've made, C# recognizes them as "fields" but I don't know how to create an instance of the class or call the functions, can anyone help me out?
Jul 16, 2008 at 12:59 AM
I figured out how to get some use out of it.

>>>import clr, sys, IronPython
>>>sys.path.Append("E:\\emailSystem")
>>>x = clr.LoadAssemblyFromFile("simpleLibrary")
>>>x.Class.Main()
0
>>>y = x.Class.Class()
>>>y.run()
'it ran'

that's from my ironPython session
here's the code for "simpleLibrary"

class

Class:

 

 

    "Description of Class"

 

 

    def run(self):

 

 

        return "it ran"

 



things might need to be done somewhat differently if it's from C# but I'll worry about that later, for now I'm gonna get more complicated assemblies to work in IronPython