您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

67 行
2.0 KiB

  1. import sys
  2. import itertools
  3. PY3 = sys.version_info >= (3,)
  4. PY2 = not PY3
  5. if PY2:
  6. basestring = basestring
  7. import __builtin__ as builtins
  8. import ConfigParser
  9. from StringIO import StringIO
  10. BytesIO = StringIO
  11. func_code = lambda o: o.func_code
  12. func_globals = lambda o: o.func_globals
  13. im_func = lambda o: o.im_func
  14. from htmlentitydefs import name2codepoint
  15. import httplib
  16. from BaseHTTPServer import HTTPServer
  17. from SimpleHTTPServer import SimpleHTTPRequestHandler
  18. from BaseHTTPServer import BaseHTTPRequestHandler
  19. iteritems = lambda o: o.iteritems()
  20. long_type = long
  21. maxsize = sys.maxint
  22. unichr = unichr
  23. unicode = unicode
  24. bytes = str
  25. from urllib import url2pathname, splittag, pathname2url
  26. import urllib2
  27. from urllib2 import urlopen, HTTPError, URLError, unquote, splituser
  28. from urlparse import urlparse, urlunparse, urljoin, urlsplit, urlunsplit
  29. filterfalse = itertools.ifilterfalse
  30. exec("""def reraise(tp, value, tb=None):
  31. raise tp, value, tb""")
  32. if PY3:
  33. basestring = str
  34. import builtins
  35. import configparser as ConfigParser
  36. from io import StringIO, BytesIO
  37. func_code = lambda o: o.__code__
  38. func_globals = lambda o: o.__globals__
  39. im_func = lambda o: o.__func__
  40. from html.entities import name2codepoint
  41. import http.client as httplib
  42. from http.server import HTTPServer, SimpleHTTPRequestHandler
  43. from http.server import BaseHTTPRequestHandler
  44. iteritems = lambda o: o.items()
  45. long_type = int
  46. maxsize = sys.maxsize
  47. unichr = chr
  48. unicode = str
  49. bytes = bytes
  50. from urllib.error import HTTPError, URLError
  51. import urllib.request as urllib2
  52. from urllib.request import urlopen, url2pathname, pathname2url
  53. from urllib.parse import (
  54. urlparse, urlunparse, unquote, splituser, urljoin, urlsplit,
  55. urlunsplit, splittag,
  56. )
  57. filterfalse = itertools.filterfalse
  58. def reraise(tp, value, tb=None):
  59. if value.__traceback__ is not tb:
  60. raise value.with_traceback(tb)
  61. raise value