######################## BEGIN LICENSE BLOCK ########################
# Contributor(s):
#   Dan Blanchard
#   Ian Cordasco
#
# This library 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 2.1 of the License, or (at your option) any later version.
#
# This library 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 this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301  USA
######################### END LICENSE BLOCK #########################

import sys


# 判断当前Python版本是否小于3.0
if sys.version_info < (3, 0):
    # 如果是Python2版本
    PY2 = True
    PY3 = False
    # 定义base_str为str和unicode类型
    base_str = (str, unicode)
    # 定义text_type为unicode类型
    text_type = unicode
else:
    # 如果是Python3版本
    PY2 = False
    PY3 = True
    # 定义base_str为bytes和str类型
    base_str = (bytes, str)
    # 定义text_type为str类型
    text_type = str
