forked from pyvisa/pyvisa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
visa.py
35 lines (28 loc) · 1.33 KB
/
visa.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -*- coding: utf-8 -*-
"""
pyvisa.visa
~~~~~~~~~~~
Module to provide an import shortcut for the most common VISA operations.
This file is part of PyVISA.
:copyright: 2014 by PyVISA Authors, see AUTHORS for more details.
:license: MIT, see COPYING for more details.
"""
from __future__ import division, unicode_literals, print_function, absolute_import
import warnings
warnings.warn(("The visa module provided by PyVISA is being deprecated. "
"You can replace `import visa` by `import pyvisa as visa` "
"to achieve the same effect.\n\n"
"The reason for the deprecation is the possible conflict with "
"the visa package provided by the "
"https://github.com/visa-sdk/visa-python which can result in "
"hard to debug situations."), FutureWarning)
from pyvisa import logger, __version__, log_to_screen, constants
from pyvisa.highlevel import ResourceManager
from pyvisa.errors import (Error, VisaIOError, VisaIOWarning, VisaTypeError,
UnknownHandler, OSNotSupported, InvalidBinaryFormat,
InvalidSession, LibraryError)
# This is needed to registry all resources.
from pyvisa.resources import Resource
from pyvisa.cmd_line_tools import visa_main
if __name__ == '__main__':
visa_main()