Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
Install the ToscaWidgets Framework.

        def install_framework(force=False):
    """Install the ToscaWidgets Framework."""
    import tw
    if not hasattr(tw, 'framework') or force:
        from tw.core.registry import StackedObjectProxy, Registry
        from tw.mods import base
        dummy_framework = base.HostFramework()
        # start up a dummy request with dummy environ
        dummy_registry = Registry()
        dummy_registry.prepare()
        dummy_framework.start_request({
            'SCRIPT_NAME': '',
            'toscawidgets.prefix': '/toscawidgets',
            'paste.registry' : dummy_registry})
        tw.framework = StackedObjectProxy(
            dummy_framework, name='ToscaWidgetsFramework')
        


src/t/o/ToscaWidgets-0.9.12/tw/core/base.py   ToscaWidgets(Download)
 
import tw
from util import (assert_bool_attr, callable_wo_args,
                  unflatten_args, OrderedSet, make_bunch,
                  install_framework, ThreadSafeDescriptor,
                  RequestLocalDescriptor, LRUCache)
 
install_framework()