# Path: common/httpd.py
# class ThreadedHTTPServer(SocketServer.ThreadingMixIn,
#                          BaseHTTPServer.HTTPServer):
# class BaseRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
#   def url_to_fs_path(self, url):
#   def send_head(self):
# 
# Path: common/util.py
# ANSI_BLUE = '\033[36m'
# ANSI_GREEN = '\033[32m'
# ANSI_RESET = '\033[0;0m'
# class Logger(object):
#   def __init__(self, color):
#   def __call__(self, msg, *args):
# def GetPackageDir():
# def GetUserDir():
# 
# Path: common/spy.py
# class Error(Exception):
# class UsageReporter(object):
# class NullUsageReporter(object):
#   def __init__(self, host_port):
#   def Send(self, msg):
#   def SendDict(self, d):
#   def SendRecord(self, event, d):
#   def Send(self, msg):
#   def SendDict(self, d):
#   def SendRecord(self, event, d):
# def _GetUsageConfig():
# def _ReadAddressFile(address_file=None):
# def GetClientFromConfig(address_file=None):


import datetime
import errno
import getpass
import json
import optparse
import os
import Queue
import threading
import string  # for lower case letters
import sys
import handlers
import tnet
from common import httpd
from common import util
from common import spy
#!/usr/bin/python
#
# Copyright 2014 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be found
# in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd

"""
webpipe.py

Server that receives content from a pipe, and serves it "interactively" to the
browser.  It relies on a "hanging GET" -- jQuery on the client and
threading.Event on the server.
"""




# outside


# Path: common/httpd.py
# class ThreadedHTTPServer(SocketServer.ThreadingMixIn,
#                          BaseHTTPServer.HTTPServer):
# class BaseRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
#   def url_to_fs_path(self, url):
#   def send_head(self):
# 
# Path: common/util.py
# ANSI_BLUE = '\033[36m'
# ANSI_GREEN = '\033[32m'
# ANSI_RESET = '\033[0;0m'
# class Logger(object):
#   def __init__(self, color):
#   def __call__(self, msg, *args):
# def GetPackageDir():
# def GetUserDir():
# 
# Path: common/spy.py
# class Error(Exception):
# class UsageReporter(object):
# class NullUsageReporter(object):
#   def __init__(self, host_port):
#   def Send(self, msg):
#   def SendDict(self, d):
#   def SendRecord(self, event, d):
#   def Send(self, msg):
#   def SendDict(self, d):
#   def SendRecord(self, event, d):
# def _GetUsageConfig():
# def _ReadAddressFile(address_file=None):
# def GetClientFromConfig(address_file=None):


# Path: webpipe/serve.py
import datetime
import errno
import getpass
import json
import optparse
import os
import Queue
import threading
import string  # for lower case letters
import sys
import handlers
import tnet
from common import httpd
from common import util
from common import spy

#!/usr/bin/python
#
# Copyright 2014 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be found
# in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd

"""
webpipe.py

Server that receives content from a pipe, and serves it "interactively" to the
browser.  It relies on a "hanging GET" -- jQuery on the client and
threading.Event on the server.
"""




# outside


log = util.Logger(util.ANSI_BLUE)