예제 #1
0
 def test_version_class(self):
     version = Version('test', 1, 2, 3)
     self.assertEqual(version.short(), '1.2.3')
     self.assertEqual(str(version), '[test, version 1.2.3]')
예제 #2
0
# -*- coding: utf-8 -*-
"""
Pymodbus3: Modbus Protocol Implementation
-----------------------------------------

TwistedModbus is built on top of the code developed by:

    Copyright (c) 2001-2005 S.W.A.C. GmbH, Germany.
    Copyright (c) 2001-2005 S.W.A.C. Bohemia s.r.o., Czech Republic.
    Hynek Petrak <*****@*****.**>

Released under the the BSD license
"""

from pymodbus3.version import Version
__version__ = Version.get_current_version().short()
__author__ = 'Galen Collins, Maxim Grischuk'
__author_email__ = '[email protected], [email protected]'

# Block unhandled logging
import logging as __logging
try:
    from logging import NullHandler as CustomNullHandler
except ImportError:

    class CustomNullHandler(__logging.Handler):
        def emit(self, record):
            pass


__logging.getLogger(__name__).addHandler(CustomNullHandler())
예제 #3
0
# -*- coding: utf-8 -*-

"""
Pymodbus3: Modbus Protocol Implementation
-----------------------------------------

TwistedModbus is built on top of the code developed by:

    Copyright (c) 2001-2005 S.W.A.C. GmbH, Germany.
    Copyright (c) 2001-2005 S.W.A.C. Bohemia s.r.o., Czech Republic.
    Hynek Petrak <*****@*****.**>

Released under the the BSD license
"""

from pymodbus3.version import Version
__version__ = Version.get_current_version().short()
__author__ = 'Galen Collins, Maxim Grischuk'
__author_email__ = '[email protected], [email protected]'

# Block unhandled logging
import logging as __logging
try:
    from logging import NullHandler as CustomNullHandler
except ImportError:
    class CustomNullHandler(__logging.Handler):
        def emit(self, record):
            pass

__logging.getLogger(__name__).addHandler(CustomNullHandler())