1 # Copyright (c) 2020 Deutsche Telekom.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 # http://www.apache.org/licenses/LICENSE-2.0
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS,
9 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 def is_above_python_3_2(): # type: () -> bool
15 """Check if code is running at least on Python 3.2 version.
18 bool: True if it's at least 3.2 version, False otherwise
21 return sys.version_info >= (3, 2, 0, "final", 0)
24 def is_above_python_2_7(): # type: () -> bool
25 """Check if code is running at least on Python 2.7 version.
28 bool: True if it's at least 2.7 version, False otherwise
31 return sys.version_info >= (2, 7, 0, "final", 0)