2017-08-04 00:52:19 +00:00
|
|
|
# Copyright 2017 Virgil Dupras
|
2013-07-19 22:42:32 +00:00
|
|
|
|
2017-08-04 00:47:58 +00:00
|
|
|
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
|
|
|
|
# which should be included with this package. The terms are also available at
|
2013-07-19 22:42:32 +00:00
|
|
|
# http://www.hardcoded.net/licenses/bsd_license
|
|
|
|
|
|
|
|
import sys
|
2017-08-04 00:47:58 +00:00
|
|
|
import os
|
|
|
|
|
|
|
|
PY3 = sys.version_info[0] >= 3
|
|
|
|
if PY3:
|
2013-07-19 22:42:32 +00:00
|
|
|
text_type = str
|
|
|
|
binary_type = bytes
|
2017-08-08 02:51:37 +00:00
|
|
|
if os.supports_bytes_environ:
|
|
|
|
# environb will be unset under Windows, but then again we're not supposed to use it.
|
|
|
|
environb = os.environb
|
2017-08-04 00:47:58 +00:00
|
|
|
else:
|
2020-06-19 02:47:06 +00:00
|
|
|
text_type = unicode # noqa: F821
|
2017-08-04 00:47:58 +00:00
|
|
|
binary_type = str
|
|
|
|
environb = os.environ
|