def set_context(self, context):
        """Replace the current context with another."""
        self._set_context(context, emit=False)
        self._modified = (not context.load_path)
        self.dataChanged.emit(self.CONTEXT_CHANGED |
                              self.REQUEST_CHANGED |
                              self.PACKAGES_PATH_CHANGED |
                              self.LOCKS_CHANGED |
                              self.LOADPATH_CHANGED |
                              self.PACKAGE_FILTER_CHANGED |
                              self.CACHING_CHANGED)
def set_context ( self , context ) : self . _set_context ( context , emit = False ) self . _modified = ( not context . load_path ) self . dataChanged . emit ( self . CONTEXT_CHANGED | self . REQUEST_CHANGED | self . PACKAGES_PATH_CHANGED | self . LOCKS_CHANGED | self . LOADPATH_CHANGED | self . PACKAGE_FILTER_CHANGED | self . CACHING_CHANGED )
Replace the current context with another.