[IronPython] dll

Garth T Kidd garth at deadlybloodyserious.com
Mon Sep 6 06:40:12 CEST 2004

IronPython-specific attributes (set either manually or via 2.4-style
@decorators) could be used to tell IronPython how to tag Python methods and
classes for the static typed languages. 


	import System
	def foo(a, b):
		return "%s: %d" % (a, b)
	my_func.__CLRdetails__ = (System.String, System.Int64,


	import CLR
	import System
	@CLR.argspec(System.Int64, System.String)
	def foo(a, b):
		return "%s: %d" % (a, b)

-----Original Message-----
From: users-ironpython.com-bounces at lists.ironpython.com
[mailto:users-ironpython.com-bounces at lists.ironpython.com] On Behalf Of Curt
Sent: Thursday, 2 September 2004 12:50 PM
To: Jim Hugunin; users-ironpython.com at lists.ironpython.com
Subject: RE: [IronPython] dll

"Jim Hugunin" <jim at ironpython.com> writes:

> Well, if you do this:
> C:\IronPython\bin> IronPythonConsole
> >>> import colors
> You'll get a file called "colors.dll" in the working directory.
> While this dll is technically referencable from C# or VB, I doubt that 
> you'll be very happy with it.  IronPython needs a static compiler, and 
> that doesn't really exist in the current release.

Isn't it more than that?  IronPython would actually need to be able to
create static type definitions in order to get "native"
support in VB or C#, and that's not a Python language feature at all.
Without that, there are only two possibilities.

1. Define your type information as an interface in VB or C# and distribute
either two assemblies or a single multi-module assembly.
2. Load the assembly dynamically and use reflection to interact with it.

Curt Hagenlocher
curt at hagenlocher.org
users-ironpython.com mailing list
users-ironpython.com at lists.ironpython.com

More information about the Ironpython-users mailing list