ASP.NET - integration of phython code with existing,c# application

Asked By anbu n on 06-Sep-11 01:48 AM
hi friends,

I am planning to integrate open source ERP with my application which I‘ve been developing in, c#. I am planning to integrate one module like Purchase Module from Open ERP .The source code for the module has been downloaded which is in Python language, the related DB table structure is also available.

Please suggest me which will be the easy way of integrating open source ERP module source code which is in Python language with my present application which is in, c#.
smr replied to anbu n on 06-Sep-11 01:52 AM

I  created a simple function to take a string (Python code statements), compile them and execute them in the scope defined.

private void CompileSourceAndExecute(String code)
  ScriptSource source = pyEngine.CreateScriptSourceFromString
        (code, SourceCodeKind.Statements);
  CompiledCode compiled = source.Compile();
  // Executes in the scope of Python

refer links

Some links: