Tuesday, July 22, 2014

Python for .NET "import" fails

If you're using Python for .NET, and you have the following Python code:
import clr
import MyNETNamespace
and you get the error message:
ImportError: No module named MyNETNamespace
You should try two things:
  1. Make sure your .dll is named "MyNETNamespace.dll"
  2. Make sure all the .dll's that MyNETNamespace.dll is dependent on are in the directory, too.