[IronPython] Exporting Python code as an assembly

Curt Hagenlocher curt at hagenlocher.org
Tue Feb 5 21:00:08 CET 2008


You can download my work-in-progress from
http://hagenlocher.org/software/ClrWrapper.zip

The source consists of the three files ClrBuilder.py, ClrWrapper.py and
MakeModule.py. There are also two "demo" files: Xtest.py and WcfServer.py.
The program can currently be run as follows:

PS F:\IronPython-2.0A8> *.\ipy.exe MakeModule.py Xtest.py*

This will produce a file called Xtest.dll.

At this point, the application doesn't require any of the standard Python
library files.  It's only been tried with the Alpha 8 binaries -- and in
fact, the hosting interfaces for IronPython still aren't entirely stable so
there's no guarantee that the DLLs produced will work with Alpha 9.

Xtest.py is a trivial application that implements a single xunit-compatible
unit test
PS F:\IronPython-2.0A8> *.\xunit.console.exe Xtest.dll /noshadow*
.
Total tests: 1, Failures: 0, Skipped: 0, Time: 0.275 seconds
WcfServer.py theoretically implements a WCF server, though I haven't gotten
as far as actually testing the output yet.  (The generated code passes the
eyeball compiler.)

Code quality is unimpressive; your mileage may vary.  And I've got to get
back to my "day job" for a few hours now :).

--
Curt Hagenlocher
curt at hagenlocher.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20080205/b817132e/attachment.html>


More information about the Ironpython-users mailing list