How to import unnamed types in IronPython?

I have C # .NET classes that exist outside of the namespace that you need to access in IronPython. Normally I would do:

import SomeNamespace
from SomeNamespace import *

However, I do not have a namespace.

+5
source share
1 answer

Import your assembly as usual, and then just import the class name:

import clr
clr.AddReference("MyAssembly") 
import MyGlobalClass
+4
source

All Articles