Can I embed Windows Python in C# or VC++?

Virgil Dupras hardcoded.software at gmail.com
Fri Dec 7 03:34:10 EST 2007


On Dec 7, 9:03 am, grbgooglefan <ganeshbo... at gmail.com> wrote:
> On Dec 7, 3:07 pm, "Gabriel Genellina" <gagsl-... at yahoo.com.ar> wrote:
>
>
>
> > En Fri, 07 Dec 2007 01:24:57 -0300, grbgooglefan <ganeshbo... at gmail.com>  
> > escribió:
>
> > > On Dec 7, 12:17 pm, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
> > > wrote:
> > >> En Thu, 06 Dec 2007 23:27:15 -0300, grbgooglefan <ganeshbo... at gmail.com>
> > >> escribió:
>
> > >> > I want to use Python's Windows (python25.dll) version to embed in my
> > >> > C# (or atleast VC++) program for performing syntax checks on the
> > >> > Python expressions which are later supposed to be evaluated at runtime
> > >> > by another C++ program [...]> Can I start doing the development using  
> > >> the include, lib & the
> > >> > python25.dll files availale after installing this MSI?
>
> > >> Yes. You don't require the source package to embed Python and use the  
> > >> API in your programs.
>
> > > Does it mean, I can embed Python in C# as well with the same APIs?
>
> > No; you can use the Python API in a native C++ application (the Python  
> > code is plain C, but all the include files have the 'extern "C" {}'  
> > declarations). For .NET there are IronPython and PythonNet, but I cannot  
> > comment on them, surely someone else may help. See  http://www.python.org/about/
>
> > --
> > Gabriel Genellina- Hide quoted text -
>
> > - Show quoted text -
>
> Hello, Anybody else out there has used Python from C#?

Yes. I use Python for .Net to embed python code in my applications,
and it works pretty well.



More information about the Python-list mailing list