[Python.NET] Runtime.Py_Main function call

techi eth <[email protected]> Mon, 16 Apr 2018 17:00:47 +0530
Newsgroups gmane.comp.python.dotnet
Message-ID <CAJw2sSCVsY5Gwz7OEosB9UQD2tWyLone01bfAyxPb7LXEgFoqA@mail.gmail.com>
Calling below function resulting thread launch from C# process or it is new
process itself.

Runtime.Py_Main(cmd.Length, cmd)



I am referring console example for nPython.exe. Below is code snippet.



public static int Main(string[] args)

        {

            // reference the static assemblyLoader to stop it being
optimized away

            AssemblyLoader a = assemblyLoader;



            string[] cmd = Environment.GetCommandLineArgs();

            PythonEngine.Initialize();



            int i = Runtime.Py_Main(cmd.Length, cmd);



            PythonEngine.Shutdown();



            return i;

        }



Thanks

_________________________________________________
Python.NET mailing list - [email protected]
https://mail.python.org/mailman/listinfo/pythondotnet