server.py 495 B

123456789101112131415161718
  1. from __future__ import absolute_import
  2. import sys
  3. assert sys.version_info[0] < 3
  4. from BaseHTTPServer import *
  5. from CGIHTTPServer import *
  6. from SimpleHTTPServer import *
  7. try:
  8. from CGIHTTPServer import _url_collapse_path # needed for a test
  9. except ImportError:
  10. try:
  11. # Python 2.7.0 to 2.7.3
  12. from CGIHTTPServer import (
  13. _url_collapse_path_split as _url_collapse_path)
  14. except ImportError:
  15. # Doesn't exist on Python 2.6.x. Ignore it.
  16. pass