Closed doddgray closed 7 months ago
Cool, thanks. Would you be able to modify this to just import pyvisa
to make this more standard? The corresponding references to visa
would then obviously also have to be changed to pyvisa
to match
Sure, I can do that. I felt a bit unsure whether all mentions of visa
(sometimes strings, kwargs, keys in dicts etc.) in the code base could safely be changed to pyvisa
. But I will give this a try.
I would generally start with the files you've modified here, and probably not modify any strings unless it clearly makes sense to.
You may be able to use a refactor tool in your editor to change import visa
to import pyvisa
and update all the references.
after a short break i finally made the suggested changes. That is,
import pyvisa as visa
with import pyvisa
visa
with pyvisa
Am I missing anything?
Since I tried to use it, I noticed the change is still missing in the drivers/spectrometers/thorlabs_ccs.py
file. You may have to check for all instances of from visa import
as well.
The goal of this pull request simply to replace all instances of
import visa
withimport pyvisa as visa
, which is required for use with the current PyVISA release. This change fixed my ability to identify visa instruments with instrumental.Let me know if any changes are needed. Thanks!