ASP.NET - integration of phython code with existing asp.net,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 asp.net, 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 asp.net, c#.
smr replied to anbu n on 06-Sep-11 01:52 AM
HI

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
  compiled.Execute(pyScope);
}


refer links
http://www.codeproject.com/KB/cs/C_Sharp_and_Iron_Python.aspx#

Some links:

  • http://aspnet.codeplex.com/wikipage?title=Dynamic%20Language%20Support&ProjectName=aspnet
  • http://stackoverflow.com/questions/441838/ironpython-on-asp-net-mvc