File: __init__.py

package info (click to toggle)
taurus 4.0.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 102,620 kB
  • ctags: 8,289
  • sloc: python: 53,073; sh: 20; makefile: 12
file content (48 lines) | stat: -rw-r--r-- 1,577 bytes parent folder | download
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
# -*- coding: utf-8 -*-

##############################################################################
##
## This file is part of Taurus
##
## http://taurus-scada.org
##
## Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
## Taurus is free software: you can redistribute it and/or modify
## it under the terms of the GNU Lesser General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## Taurus is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU Lesser General Public License for more details.
##
## You should have received a copy of the GNU Lesser General Public License
## along with Taurus.  If not, see <http://www.gnu.org/licenses/>.
##
##############################################################################

from __future__ import absolute_import

from taurus.core.util.log import deprecated


deprecated(dep='taurus.external.ordereddict', rel='4.0', alt='ordereddict')


try:
    # ordereddict from python 2.7 or from ordereddict installed package?
    from collections import OrderedDict
except ImportError:
    # ordereddict from local import
    import os
    import sys
    import warnings
    warnings.warn("ordereddict not available. Using local ordereddict",
                  ImportWarning)
    sys.path.append(os.path.dirname(__file__))
    from ordereddict import *
    del warnings
    del sys
    del os