# Path: turbulenz_tools/utils/dependencies.py
# def find_file_in_dirs(filename, dirs, error_on_multiple = False):
#     found = []
#     for d in dirs:
#         fn = join(d, filename)
#         if exists(fn):
#             if error_on_multiple:
#                 if fn not in found:
#                     found.append(fn)
#             else:
#                 return abspath(fn)
#     if error_on_multiple:
#         if len(found) > 1:
#             raise Exception("File '%s' matched several locations: %s" % found)
#         if len(found) == 1:
#             return abspath(found[0])
#     return None
# 
# Path: turbulenz_tools/utils/profiler.py
# class Profiler(object):
# 
#     _profiler_impl = ProfilerDummyImpl()
# 
#     @classmethod
#     def enable(cls):
#         if not isinstance(cls._profiler_impl, ProfilerDummyImpl):
#             raise Exception("Profiler.enable_profiler() called twice")
#         cls._profiler_impl = ProfilerImpl()
# 
#     @classmethod
#     def start(cls, section_name):
#         cls._profiler_impl.start(section_name)
# 
#     @classmethod
#     def stop(cls, section_name):
#         cls._profiler_impl.stop(section_name)
# 
#     @classmethod
#     def get_root_nodes(cls):
#         return cls._profiler_impl.get_root_nodes()
# 
#     @classmethod
#     def dump_data(cls):
#         cls._profiler_impl.dump_data()
# 
# Path: turbulenz_tools/tools/toolsexception.py
# class ToolsException(Exception):
#     pass
# 
# Path: turbulenz_tools/tools/templates.py
# def read_file_utf8(filename):
#     with open(filename, 'rb') as f:
#         text = f.read().decode('utf-8-sig')
# 
#         # This is unpleasant, but it is thorough.  This is the
#         # single-pass equivalent of:
#         # return (in_data.replace('\r\n', '\n').replace('\n\r', '\n'))\
#         #     .replace('\r', '\n');
#         return LF_RE.sub(_sanitize_crlf, text)


from turbulenz_tools.utils.dependencies import find_file_in_dirs
from turbulenz_tools.utils.profiler import Profiler
from turbulenz_tools.tools.toolsexception import ToolsException
from turbulenz_tools.tools.templates import read_file_utf8
from re import compile as re_compile
from logging import getLogger
    from turbulenz_tools.version import SDK_VERSION as engine_version
import os.path
import glob
<body style="background:#B4B4B4;font:normal normal normal 13px/1.231 Helvetica,Arial,sans-serif;text-shadow:1px 1px #F9F8F8;">
    <div id="titlebar" style="position:fixed;height:65px;top:0;right:0;left:0;">
        <strong style="font-size:24px;line-height:64px;margin:16px;">
            <!-- block tz_app_title_name -->
            /*{% block tz_app_title_name %}*/
            /*{{ tz_app_title_name_var }}*/
            /*{% endblock %}*/
            <!-- end tz_app_title_name -->
        </strong>
        <div id="titlelogo"
             style="float:right;width:27px;height:27px;margin:18px 24px;">
        </div>
    </div>
    <div id="sidebar"
         style="background:#B4B4B4;position:fixed;width:303px;top:65px;left:0;">
        <!-- block tz_app_html_controls -->
        /*{% block tz_app_html_controls %}*/
        /*{% endblock %}*/
        <!-- end tz_app_html_controls -->
    </div>
    <div id="engine" style="background:#939393;position:fixed;top:65px;
                            bottom:0;right:0;left:303px;
                            border-left:1px solid #898989;">
        <!--
          HTML to create a plugin or canvas instance.
          Supplied by 'tz_engine_div' variable.
        -->
        /*{{ tz_engine_div }}*/
    </div>


# Path: turbulenz_tools/utils/dependencies.py
# def find_file_in_dirs(filename, dirs, error_on_multiple = False):
#     found = []
#     for d in dirs:
#         fn = join(d, filename)
#         if exists(fn):
#             if error_on_multiple:
#                 if fn not in found:
#                     found.append(fn)
#             else:
#                 return abspath(fn)
#     if error_on_multiple:
#         if len(found) > 1:
#             raise Exception("File '%s' matched several locations: %s" % found)
#         if len(found) == 1:
#             return abspath(found[0])
#     return None
# 
# Path: turbulenz_tools/utils/profiler.py
# class Profiler(object):
# 
#     _profiler_impl = ProfilerDummyImpl()
# 
#     @classmethod
#     def enable(cls):
#         if not isinstance(cls._profiler_impl, ProfilerDummyImpl):
#             raise Exception("Profiler.enable_profiler() called twice")
#         cls._profiler_impl = ProfilerImpl()
# 
#     @classmethod
#     def start(cls, section_name):
#         cls._profiler_impl.start(section_name)
# 
#     @classmethod
#     def stop(cls, section_name):
#         cls._profiler_impl.stop(section_name)
# 
#     @classmethod
#     def get_root_nodes(cls):
#         return cls._profiler_impl.get_root_nodes()
# 
#     @classmethod
#     def dump_data(cls):
#         cls._profiler_impl.dump_data()
# 
# Path: turbulenz_tools/tools/toolsexception.py
# class ToolsException(Exception):
#     pass
# 
# Path: turbulenz_tools/tools/templates.py
# def read_file_utf8(filename):
#     with open(filename, 'rb') as f:
#         text = f.read().decode('utf-8-sig')
# 
#         # This is unpleasant, but it is thorough.  This is the
#         # single-pass equivalent of:
#         # return (in_data.replace('\r\n', '\n').replace('\n\r', '\n'))\
#         #     .replace('\r', '\n');
#         return LF_RE.sub(_sanitize_crlf, text)


# Path: turbulenz_tools/tools/appcodegen.py
from turbulenz_tools.utils.dependencies import find_file_in_dirs
from turbulenz_tools.utils.profiler import Profiler
from turbulenz_tools.tools.toolsexception import ToolsException
from turbulenz_tools.tools.templates import read_file_utf8
from re import compile as re_compile
from logging import getLogger
    from turbulenz_tools.version import SDK_VERSION as engine_version
import os.path
import glob

<body style="background:#B4B4B4;font:normal normal normal 13px/1.231 Helvetica,Arial,sans-serif;text-shadow:1px 1px #F9F8F8;">
    <div id="titlebar" style="position:fixed;height:65px;top:0;right:0;left:0;">
        <strong style="font-size:24px;line-height:64px;margin:16px;">
            <!-- block tz_app_title_name -->
            /*{% block tz_app_title_name %}*/
            /*{{ tz_app_title_name_var }}*/
            /*{% endblock %}*/
            <!-- end tz_app_title_name -->
        </strong>
        <div id="titlelogo"
             style="float:right;width:27px;height:27px;margin:18px 24px;">
        </div>
    </div>
    <div id="sidebar"
         style="background:#B4B4B4;position:fixed;width:303px;top:65px;left:0;">
        <!-- block tz_app_html_controls -->
        /*{% block tz_app_html_controls %}*/
        /*{% endblock %}*/
        <!-- end tz_app_html_controls -->
    </div>
    <div id="engine" style="background:#939393;position:fixed;top:65px;
                            bottom:0;right:0;left:303px;
                            border-left:1px solid #898989;">
        <!--
          HTML to create a plugin or canvas instance.
          Supplied by 'tz_engine_div' variable.
        -->
        /*{{ tz_engine_div }}*/
    </div>


    <!-- begin 'tz_include_js' variable -->