0

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.

dantdj
  • 1,237
  • 3
  • 19
  • 40
  • Have you looked at this question and the answers (and comments) there? http://stackoverflow.com/questions/1578010/ironpython-2-6-py-exe – Pavel Minaev May 11 '13 at 03:48

1 Answers1

0

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();
        }
    }
}    
Wilbert
  • 7,251
  • 6
  • 51
  • 91