/usr/lib/python3/dist-packages/PyTango/pytango_init.py is in python3-pytango 8.1.8-1.
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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | # ------------------------------------------------------------------------------
# This file is part of PyTango (http://www.tinyurl.com/PyTango)
#
# Copyright 2006-2012 CELLS / ALBA Synchrotron, Bellaterra, Spain
# Copyright 2013-2014 European Synchrotron Radiation Facility, Grenoble, France
#
# Distributed under the terms of the GNU Lesser General Public License,
# either version 3 of the License, or (at your option) any later version.
# See LICENSE.txt for more info.
# ------------------------------------------------------------------------------
"""
This is an internal PyTango module.
"""
__all__ = ['init']
__docformat__ = "restructuredtext"
from .attribute_proxy import attribute_proxy_init
from .base_types import base_types_init
from .exception import exception_init
from .callback import callback_init
from .api_util import api_util_init
from .encoded_attribute import encoded_attribute_init
from .connection import connection_init
from .db import db_init
from .device_attribute import device_attribute_init
from .device_class import device_class_init
from .device_data import device_data_init
from .device_proxy import device_proxy_init
from .device_server import device_server_init
from .group import group_init
from .group_reply import group_reply_init
from .group_reply_list import group_reply_list_init
from .pytango_pprint import pytango_pprint_init
from .pyutil import pyutil_init
from .time_val import time_val_init
from ._PyTango import constants
from ._PyTango import _get_tango_lib_release
__INITIALIZED = False
__DOC = True
def init_constants():
import sys
import platform
tg_ver = tuple(map(int, constants.TgLibVers.split(".")))
tg_ver_str = "0x%02d%02d%02d00" % (tg_ver[0], tg_ver[1], tg_ver[2])
constants.TANGO_VERSION_HEX = int(tg_ver_str, 16)
BOOST_VERSION = ".".join(map(str, (constants.BOOST_MAJOR_VERSION,
constants.BOOST_MINOR_VERSION,
constants.BOOST_PATCH_VERSION)))
constants.BOOST_VERSION = BOOST_VERSION
class Compile(object):
PY_VERSION = constants.PY_VERSION
TANGO_VERSION = constants.TANGO_VERSION
BOOST_VERSION = constants.BOOST_VERSION
NUMPY_VERSION = constants.NUMPY_VERSION
#UNAME = tuple(map(str, json.loads(constants.UNAME)))
tg_rt_ver_nb = _get_tango_lib_release()
tg_rt_major_ver = tg_rt_ver_nb // 100
tg_rt_minor_ver = tg_rt_ver_nb // 10 % 10
tg_rt_patch_ver = tg_rt_ver_nb % 10
tg_rt_ver = ".".join(map(str, (tg_rt_major_ver, tg_rt_minor_ver,
tg_rt_patch_ver)))
class Runtime(object):
PY_VERSION = ".".join(map(str, sys.version_info[:3]))
TANGO_VERSION = tg_rt_ver
BOOST_VERSION = '0.0.0'
if constants.NUMPY_SUPPORT:
import numpy
NUMPY_VERSION = numpy.__version__
else:
NUMPY_VERSION = None
UNAME = platform.uname()
constants.Compile = Compile
constants.Runtime = Runtime
def init():
global __INITIALIZED
if __INITIALIZED:
return
global __DOC
doc = __DOC
init_constants()
base_types_init(doc=doc)
exception_init(doc=doc)
callback_init(doc=doc)
api_util_init(doc=doc)
encoded_attribute_init(doc=doc)
connection_init(doc=doc)
db_init(doc=doc)
device_attribute_init(doc=doc)
device_class_init(doc=doc)
device_data_init(doc=doc)
device_proxy_init(doc=doc)
device_server_init(doc=doc)
group_init(doc=doc)
group_reply_init(doc=doc)
group_reply_list_init(doc=doc)
pytango_pprint_init(doc=doc)
pyutil_init(doc=doc)
time_val_init(doc=doc)
# must come last: depends on device_proxy.init()
attribute_proxy_init(doc=doc)
__INITIALIZED = True
|