[Python.NET] Anyone or anything happening here?

MBarclay at cri-inc.com MBarclay at cri-inc.com
Fri Feb 27 14:03:25 EST 2004


Actually, Hawkeye (and the OP) , it's yet a bit more than that. I agree
that "it is not "Python.Net"" (it does not make Python run as a .NET
language), but it does allow you to embed Python in a .NET app. In fact, as
you're probably aware, the python.exe that you run when using Python for
.NET in the conventional way (see documented examples) is a simple example
of embedding Python in a (very small) .NET app, which in turn provides
access to a very rich interface for calling back in the other direction.

The viewpoint one has while using Python for .NET in the conventional way
(running the CLR-enabled python.exe, importing CLR, and going from there)
is that the CLR is acting as an appendage to Python. But in fact there is a
duality in this architecture that is subtle but amazingly flexible. You
might say that in this clever framework, Python and .NET are mutually
embedded, which offers some unique possibilities similar to, but even more
powerful than, Jython.

BTW, Jython is pretty cool too, but I prefer Python for .NET because it is
real CPython, so almost anything that you could do in Python before
integrating it with .NET, you can still do. In Jython, any python code has
to be available in source form so it can be compiled by Jython (at least
once) whereasany Python byte code that works with the currently supported
Python runtime (2.3 currently) will work with Python for .NET.

The somewhat downplayed embedding capability is the aspect of Python for
.NET that I am personally finding very useful, with the "calling back to
.NET" feature being a very nice bonus, allowing the embedding .NET app to
use Python to allow it to sort-of "script into itself".


P.S. -- I am not contradicting you (your answer to the OP is completely
correct) -- I'm just adding a viewpoint that I have found useful.

==========================
Mark Barclay
Sr. Software Engineer, CRi Inc.



|---------+------------------------------->
|         |           "Hawkeye Parker"    |
|         |           <hawkeye.parker at auto|
|         |           desk.com>           |
|         |           Sent by:            |
|         |           pythondotnet-bounces|
|         |           @python.org         |
|         |                               |
|         |                               |
|         |           02/27/2004 01:05 PM |
|         |                               |
|---------+------------------------------->
  >-------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                   |
  |       To:       <srussell at lotmate.com>, <pythondotnet at python.org>                                                 |
  |       cc:                                                                                                         |
  |       Subject:  RE: [Python.NET] Anyone or anything happening here?                                               |
  >-------------------------------------------------------------------------------------------------------------------|




http://www.zope.org/Members/Brian/PythonNet/index_html

AFAIK, this is the only fully working (beta) implementation of anything
Python > .Net.  take a look at the link contents for details on this
implementation.  basically, it allows CPython access to .Net, but not the
other way around.  it is not "Python.Net", but CPython *for* .Net . . . .
IMHO, it's quite good, and others on the list seem to like what it does/how
it works.








More information about the PythonDotNet mailing list