1

So i have an application with an embedded Python interpreter.

We start with Py_Initialize, and when the script is run we spawn a new Interpreter with Py_NewInterpreter.

We execute the script below to use some 3rd party API's and it works great importing our Keysight.DigitalTestApps.Framework.Remote.dll that is provided.

clr.AddReference("Keysight.DigitalTestApps.Framework.Remote")
from Keysight.DigitalTestApps.Framework.Remote import *

We can use the API and everything works.

Without killing the interpreter or anything, the second time we run the script we get an error

"ImportError: No module named Keysight.DigitalTestApps.Framework.Remote"

I'm at a bit of a loss why every other python library and external library we use does not have this problem, but as soon as we include this library it has this issue.

If i remove the use of that dll i can run our script as many times as i want with no issues.

denfromufa
  • 5,610
  • 13
  • 81
  • 138
user1024792
  • 553
  • 1
  • 10
  • 23
  • do you use pythonnet for both embedding CPython in .NET and also calling into .NET assemblies from Python? why did you have c++ tag? – denfromufa Jan 11 '18 at 06:19

0 Answers0