Yes, as long as the class is also public. You just need to start ipy.exe in
the directory where your exe's at and then do:
import clr
clr.AddReference('MyApplication')
from MyApplicationsNamespace import MyApplicationsClass # if it's in a
particular namespace
or
import MyApplicationsClass # if it's in the global namespace
MyApplicationsClass.Main('arg1', 'arg2', 'arg3')
Or
MyApplicationsClass.SomeOtherMethod()
Or
x = MyApplicationsClass()
x.SomeInstanceMethod()
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of sms rku
Sent: Sunday, August 05, 2007 10:03 PM
To: [email protected]
Subject: [IronPython] C# and IronPython
I am very new to Python and IronPython.
Could you please let me know if it is possible to
Make my application [.exe] that has a static Main method and 3 other public
methods defined in a class to be accessed from IronPython script?
i.e, Will I be able to create instance of the class from IronPython script?
Will I be able to call the public methods from the script?
and also, is it possible to call the main function from the script? [ i.e
run my application]
If yes, could you please tell me how it can be done?
Thanks in advance
sms
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com