[IronPython] Exporting Python code as an assembly

Tim Riley riltim at gmail.com
Tue Feb 5 22:24:38 CET 2008


I was testing out the code provided and when I tested it using the
example I got the following error.

Note: I'm using IronPython 2.0 Alpha (2.0.0.800) on .NET 2.0.50727.1433


C:\Documents and Settings\TJRiley\Desktop\ClrWrapper>ipy.exe
MakeModule.py Xtest.py

Traceback (most recent call last):
  File , line unknown, in _stub_##2
  File C:\Documents and Settings\TJRiley\Desktop\ClrWrapper\Xtest.py,
line 4, in Initialize
  File MakeModule.py, line 331, in Initialize
  File MakeModule.py, line 39, in GetExportedClasses
IOError: Could not add reference to assembly xunit.dll

On Feb 5, 2008 3:00 PM, Curt Hagenlocher <curt at hagenlocher.org> wrote:
> 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
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>



More information about the Ironpython-users mailing list