# Path: kitty/interfaces/base.py
# class EmptyInterface(BaseInterface):
#     '''
#     This interface may be used when there is no need for user interface
#     '''
# 
#     def __init__(self, name='EmptyInterface', logger=None):
#         '''
#         :param name: name of the object
#         :param logger: logger for the object (default: None)
#         '''
#         super(EmptyInterface, self).__init__(name, logger)
# 
#     def failure_detected(self):
#         '''
#         handle failure detection
#         '''
#         pass
# 
#     def progress(self):
#         '''
#         handle progress
#         '''
#         pass
# 
#     def finished(self):
#         '''
#         handle finished
#         '''
#         pass
# 
#     def _start(self):
#         pass
# 
#     def _stop(self):
#         pass


import json
import datetime
import time
import os
import sys
from kitty.interfaces.base import EmptyInterface
from kitty.core.threading_utils import FuncThread
    from http.server import HTTPServer, BaseHTTPRequestHandler
    from urllib.parse import urlparse, parse_qs
    from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
    from urlparse import urlparse, parse_qs
        }

        endpoints = {
            '/api/': self._handle_api_request,
            '/static/': self._handle_text_request,
            '/css/': self._handle_text_request,
            '/js/': self._handle_text_request,
            '/images/': self._handle_image_request
        }
        response = None

        for endpoint in exact_endpoints:
            if self.path.lower() == endpoint:
                response = exact_endpoints[endpoint]()
                break

        if response is None:
            for endpoint in endpoints:
                if self.path.lower().startswith(endpoint):
                    response = endpoints[endpoint]()
                    break

        if response is not None:
            self.wfile.write(response)
        else:
            self.send_response(401)
            self.send_header('Content-type', 'text/html')
            self.end_headers()



# Path: kitty/interfaces/base.py
# class EmptyInterface(BaseInterface):
#     '''
#     This interface may be used when there is no need for user interface
#     '''
# 
#     def __init__(self, name='EmptyInterface', logger=None):
#         '''
#         :param name: name of the object
#         :param logger: logger for the object (default: None)
#         '''
#         super(EmptyInterface, self).__init__(name, logger)
# 
#     def failure_detected(self):
#         '''
#         handle failure detection
#         '''
#         pass
# 
#     def progress(self):
#         '''
#         handle progress
#         '''
#         pass
# 
#     def finished(self):
#         '''
#         handle finished
#         '''
#         pass
# 
#     def _start(self):
#         pass
# 
#     def _stop(self):
#         pass


# Path: kitty/interfaces/web.py
import json
import datetime
import time
import os
import sys
from kitty.interfaces.base import EmptyInterface
from kitty.core.threading_utils import FuncThread
    from http.server import HTTPServer, BaseHTTPRequestHandler
    from urllib.parse import urlparse, parse_qs
    from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
    from urlparse import urlparse, parse_qs

        }

        endpoints = {
            '/api/': self._handle_api_request,
            '/static/': self._handle_text_request,
            '/css/': self._handle_text_request,
            '/js/': self._handle_text_request,
            '/images/': self._handle_image_request
        }
        response = None

        for endpoint in exact_endpoints:
            if self.path.lower() == endpoint:
                response = exact_endpoints[endpoint]()
                break

        if response is None:
            for endpoint in endpoints:
                if self.path.lower().startswith(endpoint):
                    response = endpoints[endpoint]()
                    break

        if response is not None:
            self.wfile.write(response)
        else:
            self.send_response(401)
            self.send_header('Content-type', 'text/html')
            self.end_headers()



class WebInterface(EmptyInterface):