[IronPython] PythonEngine no constructors defined

Sylvain Hellegouarch sh at defuze.org
Fri Jul 13 09:03:20 CEST 2007


If you are using IP2 you should go with:

PythonEngine _engine = PythonEngine.CurrentEngine;

- Sylvain

googen a écrit :
> Hello, I am trying to run a python script via a VC# project, purely to create
> an exe for my application. But I am having a problem
> building every example I have found. It does not help that I have no idea
> about C#. Any help would be greatly appreciated, as I would love to 
> have an exe to pass to my friends with my application, and a google on this
> shows nothing. The code I tryed last is
>
> using System;
> using System.Collections;
> using System.Collections.Generic;
> using System.IO;
> using IronPython.Hosting;
> using IronPython.Runtime;
>
> namespace Payper
> {
> class Class1
> {
> static IronPython.Hosting.PythonEngine Py;
>
> [STAThread]
> static void Main(String[] rawArgs)
> {
> Py = new PythonEngine();
> Py.AddToPath(Environment.CurrentDirectory);
> Py.ExecuteFile("Payper.py");
> }
> }
> }
>
> When I try to build this, or any other example I have followed I get the
> following error...
>
> The type 'IronPython.Hosting.PythonEngine' has no constructors defined
>
> So what am i missing?, or does anybody know another way of creating an exe
> from ironpython?
>
> Thanks in advance
>
> googen. 
>   




More information about the Ironpython-users mailing list