I've tried the pyc.py method of ipy.exe pyc.py /main:WpfApplication2.py /target:winexe
, but that generates an exe file that does absolutely nothing.
So how can it be done? I can't find anything else about it.
I've tried the pyc.py method of ipy.exe pyc.py /main:WpfApplication2.py /target:winexe
, but that generates an exe file that does absolutely nothing.
So how can it be done? I can't find anything else about it.
Make a new C# application with the following main function:
using IronPython.Hosting;
using Microsoft.Scripting.Hosting;
namespace Example
{
class Program
{
static void Main(string[] args)
{
var ipy = Python.CreateRuntime();
dynamic py_main= ipy.UseFile("YourCode.py");
py_main.your_python_main_func();
}
}
}