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

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Fri Dec 7 02:07:41 EST 2007


En Fri, 07 Dec 2007 01:24:57 -0300, grbgooglefan <ganeshborse 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




More information about the Python-list mailing list