You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
588 B

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