Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(6)  |  Derive(0)  |  Import(4)

        def context_from_options(options, title):

    # Sanity check

    if options.hybrid:
        if options.mode not in [ 'canvas', 'canvas-debug' ]:
            raise ToolsException("--hybrid option available only in canvas and "
                                 "canvas_dev modes")

    # Set up the context

    context = {}
    context['tz_app_title_name_var'] = title
    context['tz_app_title_var'] = title

    context['tz_development'] = options.mode in [ 'plugin-debug', 'canvas-debug' ]
    context['tz_canvas'] = options.mode in [ 'canvas', 'canvas-debug' ]
    context['tz_hybrid'] = options.hybrid

    return context
        


src/t/u/turbulenz_tools-1.0.5/turbulenz_tools/tools/maketzjs.py   turbulenz_tools(Download)
from turbulenz_tools.tools.appcodegen import render_js_extract_includes
from turbulenz_tools.tools.appcodegen import inject_js_from_options
from turbulenz_tools.tools.appcodegen import context_from_options
from turbulenz_tools.tools.appcodegen import default_parser_options
from turbulenz_tools.tools.appcodegen import output_dependency_info
    # javascript includes
 
    context = context_from_options(options, input_js[0])
 
    deps = render_js_extract_includes(context, options,
 
    Profiler.start('load_templates')
    context = context_from_options(options, input_js[0])
    templates_js = env_load_templates(env, input_js)
    Profiler.stop('load_templates')

src/t/u/turbulenz_tools-HEAD/turbulenz_tools/tools/maketzjs.py   turbulenz_tools(Download)
from turbulenz_tools.tools.appcodegen import render_js_extract_includes
from turbulenz_tools.tools.appcodegen import inject_js_from_options
from turbulenz_tools.tools.appcodegen import context_from_options
from turbulenz_tools.tools.appcodegen import default_parser_options
from turbulenz_tools.tools.appcodegen import output_dependency_info
    # javascript includes
 
    context = context_from_options(options, input_js[0])
 
    deps = render_js_extract_includes(context, options,
 
    Profiler.start('load_templates')
    context = context_from_options(options, input_js[0])
    templates_js = env_load_templates(env, input_js)
    Profiler.stop('load_templates')

src/t/u/turbulenz_tools-1.0.5/turbulenz_tools/tools/makehtml.py   turbulenz_tools(Download)
 
from turbulenz_tools.tools.appcodegen import render_js
from turbulenz_tools.tools.appcodegen import context_from_options
from turbulenz_tools.tools.appcodegen import default_add_code
from turbulenz_tools.tools.appcodegen import inject_js_from_options
    title = splitext(basename(title))[0]
 
    context = context_from_options(options, title)
 
    Profiler.stop('load_templates')

src/t/u/turbulenz_tools-HEAD/turbulenz_tools/tools/makehtml.py   turbulenz_tools(Download)
 
from turbulenz_tools.tools.appcodegen import render_js
from turbulenz_tools.tools.appcodegen import context_from_options
from turbulenz_tools.tools.appcodegen import default_add_code
from turbulenz_tools.tools.appcodegen import inject_js_from_options
    title = splitext(basename(title))[0]
 
    context = context_from_options(options, title)
 
    Profiler.stop('load_templates')