In my code I want to potentially create multiple instances of pyvisa.ResourceManager
. However, I the second instance never finds any (USB) devices. Directly addressing the device will also create an error. Essentially my question is as following: why does the following code first print a list with one connected element, and then an empty list:
rm = pyvisa.ResourceManager()
print(rm.list_resources())
rm.close()
rm2 = pyvisa.ResourceManager()
print(rm2.list_resources())
Of course, I could fix this, by only creating one instance, and passing it around, however I would still like to understand what is going on here.