I have a Iron Python script that I want to run and then have the ipy interpreter output an assembly that I can run on other machines. How do I do that? Is there a switch I can pass to ipy.exe?
One way to is to use SharpDevelop, it builds assemblies (executables and class libraries) easily.
The process is straightforward:
The .exe and .dll files will be in the relevant build output directory (Debug or Release).
Another way is to the IronPython command line compiler script called pyc.py.
The compiler script can be found in the directory:
[IP_install_dir]\Tools\Scripts
Usage:ipy.exe pyc.py /main:Program.py Form.py /target:winexe
Note: To get the compiled exe to run you will need the following files in the same directory as your executable:
IronPython.dll
IronPython.Modules.dll
Microsoft.Dynamic.dll
Microsoft.Scripting.Core.dll
Microsoft.Scripting.Debugging.dll
Microsoft.Scripting.dll
Microsoft.Scripting.ExtensionAttribute.dll
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