Embedding a CPython Script engine in a .NET application.

"Martin v. Löwis" martin at v.loewis.de
Wed Nov 23 19:25:51 EST 2005


Carl Waldbieser wrote:
> Has anyone had any experience embedding a CPython engine in a .NET
> application?  In the COM/ActiveX world, it was pretty easy to use Mark
> Hammond's win32 modules to create a script engine component that you could
> expose other COM objects to, but I was not sure how I would go about doing
> something similar in a .NET environment.

I don't have experience with this specific problem, but in general,
.NET is really good at calling COM objects (in fact, this was
historically the sole reason for creating .NET: to make COM better
usable).

So just import, in VS.NET, the Python interpreter to your project
(Add Reference), and use the C# functions that the COM interop
code gives you.

Regards,
Martin



More information about the Python-list mailing list