/usr/lib/python2.7/dist-packages/pyvisa/__init__.py is in python-pyvisa 1.8-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | # -*- coding: utf-8 -*-
"""
pyvisa
~~~~~~
Python wrapper of National Instrument (NI) Virtual Instruments Software
Architecture library (VISA).
This file is part of PyVISA.
:copyright: 2014 by PyVISA Authors, see AUTHORS for more details.
:license: MIT, see LICENSE for more details.
"""
from __future__ import division, unicode_literals, print_function, absolute_import
import logging
import pkg_resources
from . import compat
logger = logging.getLogger('pyvisa')
logger.addHandler(compat.NullHandler())
def log_to_screen(level=logging.DEBUG):
logger.setLevel(level)
ch = logging.StreamHandler()
ch.setLevel(level)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
ch.setFormatter(formatter)
logger.addHandler(ch)
__version__ = "unknown"
try: # pragma: no cover
__version__ = pkg_resources.get_distribution('pyvisa').version
except: # pragma: no cover
pass # we seem to have a local copy without any repository control or installed without setuptools
# so the reported version will be __unknown__
from .highlevel import ResourceManager
from .errors import (Error, VisaIOError, VisaIOWarning, VisaTypeError,
UnknownHandler, OSNotSupported, InvalidBinaryFormat,
InvalidSession, LibraryError)
# This is needed to registry all resources.
from .resources import Resource
from . import ctwrapper
|