|
1 # Copyright 2017 Virgil Dupras |
|
2 |
|
3 # This software is licensed under the "BSD" License as described in the "LICENSE" file, |
|
4 # which should be included with this package. The terms are also available at |
|
5 # http://www.hardcoded.net/licenses/bsd_license |
|
6 |
|
7 from __future__ import unicode_literals |
|
8 |
|
9 import sys |
|
10 import os |
|
11 |
|
12 PY3 = sys.version_info[0] >= 3 |
|
13 if PY3: |
|
14 text_type = str |
|
15 binary_type = bytes |
|
16 if os.supports_bytes_environ: |
|
17 # environb will be unset under Windows, but then again we're not supposed to use it. |
|
18 environb = os.environb |
|
19 else: |
|
20 text_type = unicode |
|
21 binary_type = str |
|
22 environb = os.environ |