how to call python code from C#

Ryan Paul segphault at sbcglobal.net
Tue Jan 25 04:13:56 EST 2005


On Tue, 25 Jan 2005 00:35:04 +0530, paritosh mahana wrote:

> Hi all,
> How can I call python code from my C#  code. One thing is to make an
> .exe file of the python program and then try to call it from my C#
> code. But I don't like that idea. Is there any other way to do this.
> Like making a .dll file from the python code and somehow call it from
> C# program.But I couldn't find anything on this topic on the net.
> Actually my GUI is in C#  and rest part is in python, and i need to
> call python from my C# program. Please correct me if I am wrong
> anywhere.
> thanks
> paritosh.

This may not be relevant, but if what you are looking for is a way to
write a program for .NET with a language that doesnt suck, you might want
to look at Boo (http://boo.codehaus.org/). I'm not sure if it can directly
use winforms, but you can probably make native .net libraries with it that
you can utilize from C#. Boo looks and feels almost exactly like
Python, so the learning curve is minimal, and using it is very pleasant.

-- SegPhault



More information about the Python-list mailing list