[IronPython] DirectX

Curt Hagenlocher curt at hagenlocher.org
Wed Sep 15 06:17:30 PDT 2004


Nicholas Jacobson <nicksjacobson at yahoo.com> writes:

> Why doesn't the following line work in
> IronPythonConsole: "import Microsoft.DirectX"?

Just like the C# compiler, there are some libraries that
FePy knows about, and some for which you have to give it
an assembly reference.  Currently, the way to give it an
assembly reference is to use either sys.LoadAssemblyByName
or sys.LoadAssemblyFromFile.  For DirectX, you want

import sys
sys.LoadAssemblyByName('Microsoft.DirectX')
import Microsoft.DirectX

--
Curt Hagenlocher
curt at hagenlocher.org


More information about the users-ironpython.com mailing list