Is it possible to expose an API in a .NET application by embedding a scripting language like IronPython?
How is it done?
Python is Python, the only difference is that IronPython was designed to run on the CLR (. NET Framework), and as such, can inter-operate and consume . NET assemblies written in other .
NET Framework. IronPython works as an extension to the . NET Framework, but it can also be used by . NET projects to take advantage of Python's scripting power.
IronPython is a Python compiler. It compiles Python code to in memory bytecode before execution (which can be saved to disk, making binary only distributions possible).
IronPython has a hosting API which can be used to execute IronPython scripts from a C#\VB application.
This is a good example of embedding IronPython inside a winforms app.Note that the hosting APIs have changed since that post. This post shows an example of the latest API
You can find the latest specs here [Note: URL throws a 404 as of 2010-09-07]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With