calibre/src/polyglot/http_server.py
2018-09-10 20:44:16 +05:30

14 lines
430 B
Python

#!/usr/bin/env python2
# vim:fileencoding=utf-8
# License: GPL v3 Copyright: 2018, Kovid Goyal <kovid at kovidgoyal.net>
from __future__ import absolute_import, division, print_function, unicode_literals
from polyglot.builtins import is_py3
if is_py3:
from http.server import BaseHTTPServer, SimpleHTTPRequestHandler
else:
import BaseHTTPServer # noqa
from SimpleHTTPServer import SimpleHTTPRequestHandler # noqa