I added a dll using pythonnet
to my Python script like this:
import os
import clr
clr.AddReference(os.path.join(os.path.abspath('.'), 'dlls', 'Supplier.Bundle.dll'))
import Supplier.Bundle
It works just fine, I can call methods or instantiate classes right from the Supplier.Bundle
namespace, but when I want to call a method from a nested namespace like Supplier.Bundle.Features
I got the error:
AttributeError: Features
I also tried the following:
import Supplier.Bundle.Features
Which throws:
ModuleNotFoundError: No module named 'Supplier.Bundle.Features'; 'Supplier.Bundle' is not a package
Using the same dll in C# works just fine:
using Supplier.Bundle.Features
So my question is: how to access classes and methods of nested namespaces of a C# dll within Python3.x using pythonnet
?