Python jinja2.utils 模块,concat() 实例源码

我们从Python开源项目中,提取了以下50个代码示例,用于说明如何使用jinja2.utils.concat()

项目:Flask_Blog    作者:sugarguo    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:swjtu-pyscraper    作者:Desgard    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:sublime-text-3-packages    作者:nickjj    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:zanph    作者:zanph    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:Sci-Finder    作者:snverse    | 项目源码 | 文件源码
def return_buffer_contents(self, frame, force_unescaped=False):
        """Return the buffer contents of the frame."""
        if not force_unescaped:
            if frame.eval_ctx.volatile:
                self.writeline('if context.eval_ctx.autoescape:')
                self.indent()
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                self.outdent()
                self.writeline('else:')
                self.indent()
                self.writeline('return concat(%s)' % frame.buffer)
                self.outdent()
                return
            elif frame.eval_ctx.autoescape:
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                return
        self.writeline('return concat(%s)' % frame.buffer)
项目:Sci-Finder    作者:snverse    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        self.push_assign_tracking()
        block_frame = frame.inner()
        # This is a special case.  Since a set block always captures we
        # will disable output checks.  This way one can use set blocks
        # toplevel even in extended templates.
        block_frame.require_output_check = False
        block_frame.symbols.analyze_node(node)
        self.enter_frame(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.newline(node)
        self.visit(node.target, frame)
        self.write(' = (Markup if context.eval_ctx.autoescape '
                   'else identity)(concat(%s))' % block_frame.buffer)
        self.pop_assign_tracking(frame)
        self.leave_frame(block_frame)

    # -- Expression Visitors
项目:Sci-Finder    作者:snverse    | 项目源码 | 文件源码
def return_buffer_contents(self, frame, force_unescaped=False):
        """Return the buffer contents of the frame."""
        if not force_unescaped:
            if frame.eval_ctx.volatile:
                self.writeline('if context.eval_ctx.autoescape:')
                self.indent()
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                self.outdent()
                self.writeline('else:')
                self.indent()
                self.writeline('return concat(%s)' % frame.buffer)
                self.outdent()
                return
            elif frame.eval_ctx.autoescape:
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                return
        self.writeline('return concat(%s)' % frame.buffer)
项目:Texty    作者:sarthfrey    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:RPoint    作者:george17-meet    | 项目源码 | 文件源码
def return_buffer_contents(self, frame, force_unescaped=False):
        """Return the buffer contents of the frame."""
        if not force_unescaped:
            if frame.eval_ctx.volatile:
                self.writeline('if context.eval_ctx.autoescape:')
                self.indent()
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                self.outdent()
                self.writeline('else:')
                self.indent()
                self.writeline('return concat(%s)' % frame.buffer)
                self.outdent()
                return
            elif frame.eval_ctx.autoescape:
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                return
        self.writeline('return concat(%s)' % frame.buffer)
项目:RPoint    作者:george17-meet    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        self.push_assign_tracking()
        block_frame = frame.inner()
        # This is a special case.  Since a set block always captures we
        # will disable output checks.  This way one can use set blocks
        # toplevel even in extended templates.
        block_frame.require_output_check = False
        block_frame.symbols.analyze_node(node)
        self.enter_frame(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.newline(node)
        self.visit(node.target, frame)
        self.write(' = (Markup if context.eval_ctx.autoescape '
                   'else identity)(concat(%s))' % block_frame.buffer)
        self.pop_assign_tracking(frame)
        self.leave_frame(block_frame)

    # -- Expression Visitors
项目:isni-reconcile    作者:cmh2166    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:macos-st-packages    作者:zce    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:RealtimePythonChat    作者:quangtqag    | 项目源码 | 文件源码
def return_buffer_contents(self, frame, force_unescaped=False):
        """Return the buffer contents of the frame."""
        if not force_unescaped:
            if frame.eval_ctx.volatile:
                self.writeline('if context.eval_ctx.autoescape:')
                self.indent()
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                self.outdent()
                self.writeline('else:')
                self.indent()
                self.writeline('return concat(%s)' % frame.buffer)
                self.outdent()
                return
            elif frame.eval_ctx.autoescape:
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                return
        self.writeline('return concat(%s)' % frame.buffer)
项目:RealtimePythonChat    作者:quangtqag    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        self.push_assign_tracking()
        block_frame = frame.inner()
        # This is a special case.  Since a set block always captures we
        # will disable output checks.  This way one can use set blocks
        # toplevel even in extended templates.
        block_frame.require_output_check = False
        block_frame.symbols.analyze_node(node)
        self.enter_frame(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.newline(node)
        self.visit(node.target, frame)
        self.write(' = (Markup if context.eval_ctx.autoescape '
                   'else identity)(concat(%s))' % block_frame.buffer)
        self.pop_assign_tracking(frame)
        self.leave_frame(block_frame)

    # -- Expression Visitors
项目:Indushell    作者:SecarmaLabs    | 项目源码 | 文件源码
def return_buffer_contents(self, frame, force_unescaped=False):
        """Return the buffer contents of the frame."""
        if not force_unescaped:
            if frame.eval_ctx.volatile:
                self.writeline('if context.eval_ctx.autoescape:')
                self.indent()
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                self.outdent()
                self.writeline('else:')
                self.indent()
                self.writeline('return concat(%s)' % frame.buffer)
                self.outdent()
                return
            elif frame.eval_ctx.autoescape:
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                return
        self.writeline('return concat(%s)' % frame.buffer)
项目:Indushell    作者:SecarmaLabs    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        self.push_assign_tracking()
        block_frame = frame.inner()
        # This is a special case.  Since a set block always captures we
        # will disable output checks.  This way one can use set blocks
        # toplevel even in extended templates.
        block_frame.require_output_check = False
        block_frame.symbols.analyze_node(node)
        self.enter_frame(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.newline(node)
        self.visit(node.target, frame)
        self.write(' = (Markup if context.eval_ctx.autoescape '
                   'else identity)(concat(%s))' % block_frame.buffer)
        self.pop_assign_tracking(frame)
        self.leave_frame(block_frame)

    # -- Expression Visitors
项目:Liljimbo-Chatbot    作者:chrisjim316    | 项目源码 | 文件源码
def return_buffer_contents(self, frame, force_unescaped=False):
        """Return the buffer contents of the frame."""
        if not force_unescaped:
            if frame.eval_ctx.volatile:
                self.writeline('if context.eval_ctx.autoescape:')
                self.indent()
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                self.outdent()
                self.writeline('else:')
                self.indent()
                self.writeline('return concat(%s)' % frame.buffer)
                self.outdent()
                return
            elif frame.eval_ctx.autoescape:
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                return
        self.writeline('return concat(%s)' % frame.buffer)
项目:Liljimbo-Chatbot    作者:chrisjim316    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        self.push_assign_tracking()
        block_frame = frame.inner()
        # This is a special case.  Since a set block always captures we
        # will disable output checks.  This way one can use set blocks
        # toplevel even in extended templates.
        block_frame.require_output_check = False
        block_frame.symbols.analyze_node(node)
        self.enter_frame(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.newline(node)
        self.visit(node.target, frame)
        self.write(' = (Markup if context.eval_ctx.autoescape '
                   'else identity)(concat(%s))' % block_frame.buffer)
        self.pop_assign_tracking(frame)
        self.leave_frame(block_frame)

    # -- Expression Visitors
项目:flask_system    作者:prashasy    | 项目源码 | 文件源码
def return_buffer_contents(self, frame, force_unescaped=False):
        """Return the buffer contents of the frame."""
        if not force_unescaped:
            if frame.eval_ctx.volatile:
                self.writeline('if context.eval_ctx.autoescape:')
                self.indent()
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                self.outdent()
                self.writeline('else:')
                self.indent()
                self.writeline('return concat(%s)' % frame.buffer)
                self.outdent()
                return
            elif frame.eval_ctx.autoescape:
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                return
        self.writeline('return concat(%s)' % frame.buffer)
项目:flask_system    作者:prashasy    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        self.push_assign_tracking()
        block_frame = frame.inner()
        # This is a special case.  Since a set block always captures we
        # will disable output checks.  This way one can use set blocks
        # toplevel even in extended templates.
        block_frame.require_output_check = False
        block_frame.symbols.analyze_node(node)
        self.enter_frame(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.newline(node)
        self.visit(node.target, frame)
        self.write(' = (Markup if context.eval_ctx.autoescape '
                   'else identity)(concat(%s))' % block_frame.buffer)
        self.pop_assign_tracking(frame)
        self.leave_frame(block_frame)

    # -- Expression Visitors
项目:chihu    作者:yelongyu    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:ShelbySearch    作者:Agentscreech    | 项目源码 | 文件源码
def return_buffer_contents(self, frame, force_unescaped=False):
        """Return the buffer contents of the frame."""
        if not force_unescaped:
            if frame.eval_ctx.volatile:
                self.writeline('if context.eval_ctx.autoescape:')
                self.indent()
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                self.outdent()
                self.writeline('else:')
                self.indent()
                self.writeline('return concat(%s)' % frame.buffer)
                self.outdent()
                return
            elif frame.eval_ctx.autoescape:
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                return
        self.writeline('return concat(%s)' % frame.buffer)
项目:ShelbySearch    作者:Agentscreech    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        self.push_assign_tracking()
        block_frame = frame.inner()
        # This is a special case.  Since a set block always captures we
        # will disable output checks.  This way one can use set blocks
        # toplevel even in extended templates.
        block_frame.require_output_check = False
        block_frame.symbols.analyze_node(node)
        self.enter_frame(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.newline(node)
        self.visit(node.target, frame)
        self.write(' = (Markup if context.eval_ctx.autoescape '
                   'else identity)(concat(%s))' % block_frame.buffer)
        self.pop_assign_tracking(frame)
        self.leave_frame(block_frame)

    # -- Expression Visitors
项目:tellmeabout.coffee    作者:billyfung    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:FileStoreGAE    作者:liantian-cn    | 项目源码 | 文件源码
def return_buffer_contents(self, frame, force_unescaped=False):
        """Return the buffer contents of the frame."""
        if not force_unescaped:
            if frame.eval_ctx.volatile:
                self.writeline('if context.eval_ctx.autoescape:')
                self.indent()
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                self.outdent()
                self.writeline('else:')
                self.indent()
                self.writeline('return concat(%s)' % frame.buffer)
                self.outdent()
                return
            elif frame.eval_ctx.autoescape:
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                return
        self.writeline('return concat(%s)' % frame.buffer)
项目:FileStoreGAE    作者:liantian-cn    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        self.push_assign_tracking()
        block_frame = frame.inner()
        # This is a special case.  Since a set block always captures we
        # will disable output checks.  This way one can use set blocks
        # toplevel even in extended templates.
        block_frame.require_output_check = False
        block_frame.symbols.analyze_node(node)
        self.enter_frame(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.newline(node)
        self.visit(node.target, frame)
        self.write(' = (Markup if context.eval_ctx.autoescape '
                   'else identity)(concat(%s))' % block_frame.buffer)
        self.pop_assign_tracking(frame)
        self.leave_frame(block_frame)

    # -- Expression Visitors
项目:bawk    作者:jttwnsnd    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:infinite-lorem-ipsum    作者:patjm1992    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:Price-Comparator    作者:Thejas-1    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:chalktalk_docs    作者:loremIpsum1771    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:python-group-proj    作者:Sharcee    | 项目源码 | 文件源码
def return_buffer_contents(self, frame, force_unescaped=False):
        """Return the buffer contents of the frame."""
        if not force_unescaped:
            if frame.eval_ctx.volatile:
                self.writeline('if context.eval_ctx.autoescape:')
                self.indent()
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                self.outdent()
                self.writeline('else:')
                self.indent()
                self.writeline('return concat(%s)' % frame.buffer)
                self.outdent()
                return
            elif frame.eval_ctx.autoescape:
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                return
        self.writeline('return concat(%s)' % frame.buffer)
项目:python-group-proj    作者:Sharcee    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        self.push_assign_tracking()
        block_frame = frame.inner()
        # This is a special case.  Since a set block always captures we
        # will disable output checks.  This way one can use set blocks
        # toplevel even in extended templates.
        block_frame.require_output_check = False
        block_frame.symbols.analyze_node(node)
        self.enter_frame(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.newline(node)
        self.visit(node.target, frame)
        self.write(' = (Markup if context.eval_ctx.autoescape '
                   'else identity)(concat(%s))' % block_frame.buffer)
        self.pop_assign_tracking(frame)
        self.leave_frame(block_frame)

    # -- Expression Visitors
项目:islam-buddy    作者:hamir    | 项目源码 | 文件源码
def return_buffer_contents(self, frame, force_unescaped=False):
        """Return the buffer contents of the frame."""
        if not force_unescaped:
            if frame.eval_ctx.volatile:
                self.writeline('if context.eval_ctx.autoescape:')
                self.indent()
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                self.outdent()
                self.writeline('else:')
                self.indent()
                self.writeline('return concat(%s)' % frame.buffer)
                self.outdent()
                return
            elif frame.eval_ctx.autoescape:
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                return
        self.writeline('return concat(%s)' % frame.buffer)
项目:islam-buddy    作者:hamir    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        self.push_assign_tracking()
        block_frame = frame.inner()
        # This is a special case.  Since a set block always captures we
        # will disable output checks.  This way one can use set blocks
        # toplevel even in extended templates.
        block_frame.require_output_check = False
        block_frame.symbols.analyze_node(node)
        self.enter_frame(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.newline(node)
        self.visit(node.target, frame)
        self.write(' = (Markup if context.eval_ctx.autoescape '
                   'else identity)(concat(%s))' % block_frame.buffer)
        self.pop_assign_tracking(frame)
        self.leave_frame(block_frame)

    # -- Expression Visitors
项目:covar_me_app    作者:CovarMe    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:Flask-NvRay-Blog    作者:rui7157    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:Flask-NvRay-Blog    作者:rui7157    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:PornGuys    作者:followloda    | 项目源码 | 文件源码
def return_buffer_contents(self, frame, force_unescaped=False):
        """Return the buffer contents of the frame."""
        if not force_unescaped:
            if frame.eval_ctx.volatile:
                self.writeline('if context.eval_ctx.autoescape:')
                self.indent()
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                self.outdent()
                self.writeline('else:')
                self.indent()
                self.writeline('return concat(%s)' % frame.buffer)
                self.outdent()
                return
            elif frame.eval_ctx.autoescape:
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                return
        self.writeline('return concat(%s)' % frame.buffer)
项目:PornGuys    作者:followloda    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        self.push_assign_tracking()
        block_frame = frame.inner()
        # This is a special case.  Since a set block always captures we
        # will disable output checks.  This way one can use set blocks
        # toplevel even in extended templates.
        block_frame.require_output_check = False
        block_frame.symbols.analyze_node(node)
        self.enter_frame(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.newline(node)
        self.visit(node.target, frame)
        self.write(' = (Markup if context.eval_ctx.autoescape '
                   'else identity)(concat(%s))' % block_frame.buffer)
        self.pop_assign_tracking(frame)
        self.leave_frame(block_frame)

    # -- Expression Visitors
项目:splunk_ta_ps4_f1_2016    作者:jonathanvarley    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:python_ddd_flask    作者:igorvinnicius    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:TA-SyncKVStore    作者:georgestarcher    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:cb-defense-splunk-app    作者:carbonblack    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:remoteControlPPT    作者:htwenning    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:jieba-GAE    作者:liantian-cn    | 项目源码 | 文件源码
def return_buffer_contents(self, frame, force_unescaped=False):
        """Return the buffer contents of the frame."""
        if not force_unescaped:
            if frame.eval_ctx.volatile:
                self.writeline('if context.eval_ctx.autoescape:')
                self.indent()
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                self.outdent()
                self.writeline('else:')
                self.indent()
                self.writeline('return concat(%s)' % frame.buffer)
                self.outdent()
                return
            elif frame.eval_ctx.autoescape:
                self.writeline('return Markup(concat(%s))' % frame.buffer)
                return
        self.writeline('return concat(%s)' % frame.buffer)
项目:jieba-GAE    作者:liantian-cn    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        self.push_assign_tracking()
        block_frame = frame.inner()
        # This is a special case.  Since a set block always captures we
        # will disable output checks.  This way one can use set blocks
        # toplevel even in extended templates.
        block_frame.require_output_check = False
        block_frame.symbols.analyze_node(node)
        self.enter_frame(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.newline(node)
        self.visit(node.target, frame)
        self.write(' = (Markup if context.eval_ctx.autoescape '
                   'else identity)(concat(%s))' % block_frame.buffer)
        self.pop_assign_tracking(frame)
        self.leave_frame(block_frame)

    # -- Expression Visitors
项目:sublimeTextConfig    作者:luoye-fe    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:ASE-Fall2016    作者:Dai0526    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:APIGateway    作者:n89nanda    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors
项目:QA4LOV    作者:gatemezing    | 项目源码 | 文件源码
def visit_AssignBlock(self, node, frame):
        block_frame = frame.inner()
        block_frame.inspect(node.body)
        aliases = self.push_scope(block_frame)
        self.pull_locals(block_frame)
        self.buffer(block_frame)
        self.blockvisit(node.body, block_frame)
        self.pop_scope(aliases, block_frame)

        assignment_frame = self.make_assignment_frame(frame)
        self.newline(node)
        self.visit(node.target, assignment_frame)
        self.write(' = concat(%s)' % block_frame.buffer)
        self.export_assigned_vars(frame, assignment_frame)

    # -- Expression Visitors