views:

36

answers:

1

import clr

clr.AddReferenceToFileAndPath(r'E:\MyDocuments\Surface Extension\Samples\test.dll')

But, How to watch the types in the test.dll.

import test

I got : error: No module named test

Shold I must know the types in the test.dll??

+1  A: 

For import you need to know the namespaces or type names if not in a namespace to import them. But you can do "test = clr.LoadAssemblyFromFileWithPath(...)" which will return an assembly object. In IronPython assembly objects support dotting through them so you could then access the namespaces/types directly from that object.

Dino Viehland