CommonConstants.py 686 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. '''
  4. Created on 2017-12-20
  5. @author: liuqun
  6. '''
  7. import re
  8. import threading
  9. import sys
  10. ALIPAY_SDK_PYTHON_VERSION = "alipay-sdk-python-3.3.398.ALL"
  11. PYTHON_VERSION_3 = True
  12. if sys.version_info < (3, 0):
  13. PYTHON_VERSION_3 = False
  14. PATTERN_RESPONSE_BEGIN = re.compile(r'(\"[a-zA-z_]+_response\"[ \t\n]*:[ \t\n]*\{)')
  15. PATTERN_RESPONSE_SIGN_BEGIN = re.compile(r'(\}[ \t\n]*,[ \t\n]*\"sign\"[ \t\n]*:[ \t\n]*\")')
  16. PATTERN_RESPONSE_ENCRYPT_BEGIN = re.compile(r'(\"[a-zA-z_]+_response\"[ \t\n]*:[ \t\n]*\")')
  17. PATTERN_RESPONSE_SIGN_ENCRYPT_BEGIN = re.compile(r'(\"[ \t\n]*,[ \t\n]*\"sign\"[ \t\n]*:[ \t\n]*\")')
  18. THREAD_LOCAL = threading.local()