# Path: mako/lookup.py
# class TemplateCollection(object):
# class TemplateLookup(TemplateCollection):
#     def has_template(self, uri):
#     def get_template(self, uri, relativeto=None):
#     def filename_to_uri(self, uri, filename):
#     def adjust_uri(self, uri, filename):
#     def __init__(self, 
#                         directories=None, 
#                         module_directory=None, 
#                         filesystem_checks=True, 
#                         collection_size=-1, 
#                         format_exceptions=False, 
#                         error_handler=None, 
#                         disable_unicode=False, 
#                         output_encoding=None, 
#                         encoding_errors='strict', 
#                         cache_type=None, 
#                         cache_dir=None, cache_url=None,
#                         cache_enabled=True, 
#                         modulename_callable=None, 
#                         default_filters=None, 
#                         buffer_filters=(), 
#                         imports=None, 
#                         input_encoding=None, 
#                         preprocessor=None):
#     def get_template(self, uri):
#     def adjust_uri(self, uri, relativeto):
#     def filename_to_uri(self, filename):
#     def _relativeize(self, filename):
#     def _load(self, filename, uri):
#     def _check(self, uri, template):
#     def put_string(self, uri, text):
#     def put_template(self, uri, template):
# 
# Path: mako/exceptions.py
# class MakoException(Exception):
# class RuntimeException(MakoException):
# class CompileException(MakoException):
# class SyntaxException(MakoException):
# class TemplateLookupException(MakoException):
# class TopLevelLookupException(TemplateLookupException):
# class RichTraceback(object):
# def _format_filepos(lineno, pos, filename):
#     def __init__(self, message, source, lineno, pos, filename):
#     def __init__(self, message, source, lineno, pos, filename):
#     def __init__(self, traceback=None):
#     def init_message(self):
#     def _get_reformatted_records(self, records):
#     def _init(self, trcback):
# def text_error_template(lookup=None):
# def html_error_template():


from mako.template import Template
from mako import lookup, exceptions
from util import flatten_result, result_lines
import unittest
import os


if not os.access('./test_htdocs', os.F_OK):
    os.mkdir('./test_htdocs')
file('./test_htdocs/index.html', 'w').write("this is index")
file('./test_htdocs/incl.html', 'w').write("this is include 1")
if not os.access('./test_htdocs/subdir', os.F_OK):
    os.mkdir('./test_htdocs/subdir')
file('./test_htdocs/subdir/incl.html', 'w').write("""
    this is include 2
""")
file('./test_htdocs/subdir/index.html', 'w').write("""
    this is sub index
    <%include file="incl.html"/>
""")


# Path: mako/lookup.py
# class TemplateCollection(object):
# class TemplateLookup(TemplateCollection):
#     def has_template(self, uri):
#     def get_template(self, uri, relativeto=None):
#     def filename_to_uri(self, uri, filename):
#     def adjust_uri(self, uri, filename):
#     def __init__(self, 
#                         directories=None, 
#                         module_directory=None, 
#                         filesystem_checks=True, 
#                         collection_size=-1, 
#                         format_exceptions=False, 
#                         error_handler=None, 
#                         disable_unicode=False, 
#                         output_encoding=None, 
#                         encoding_errors='strict', 
#                         cache_type=None, 
#                         cache_dir=None, cache_url=None,
#                         cache_enabled=True, 
#                         modulename_callable=None, 
#                         default_filters=None, 
#                         buffer_filters=(), 
#                         imports=None, 
#                         input_encoding=None, 
#                         preprocessor=None):
#     def get_template(self, uri):
#     def adjust_uri(self, uri, relativeto):
#     def filename_to_uri(self, filename):
#     def _relativeize(self, filename):
#     def _load(self, filename, uri):
#     def _check(self, uri, template):
#     def put_string(self, uri, text):
#     def put_template(self, uri, template):
# 
# Path: mako/exceptions.py
# class MakoException(Exception):
# class RuntimeException(MakoException):
# class CompileException(MakoException):
# class SyntaxException(MakoException):
# class TemplateLookupException(MakoException):
# class TopLevelLookupException(TemplateLookupException):
# class RichTraceback(object):
# def _format_filepos(lineno, pos, filename):
#     def __init__(self, message, source, lineno, pos, filename):
#     def __init__(self, message, source, lineno, pos, filename):
#     def __init__(self, traceback=None):
#     def init_message(self):
#     def _get_reformatted_records(self, records):
#     def _init(self, trcback):
# def text_error_template(lookup=None):
# def html_error_template():


# Path: test/test_lookup.py
from mako.template import Template
from mako import lookup, exceptions
from util import flatten_result, result_lines
import unittest
import os



if not os.access('./test_htdocs', os.F_OK):
    os.mkdir('./test_htdocs')
file('./test_htdocs/index.html', 'w').write("this is index")
file('./test_htdocs/incl.html', 'w').write("this is include 1")
if not os.access('./test_htdocs/subdir', os.F_OK):
    os.mkdir('./test_htdocs/subdir')
file('./test_htdocs/subdir/incl.html', 'w').write("""
    this is include 2
""")
file('./test_htdocs/subdir/index.html', 'w').write("""
    this is sub index
    <%include file="incl.html"/>
""")


tl = lookup.TemplateLookup(directories=['./test_htdocs'])