content is a list of strings. it is unedited directive conent

        This runs it line by line in the InteractiveShell, prepends
        prompts as needed capturing stderr and stdout, then returns
        the content as a list as if it were ipython code

def process_pure_python2(self, content):
        """
        content is a list of strings. it is unedited directive conent

        This runs it line by line in the InteractiveShell, prepends
        prompts as needed capturing stderr and stdout, then returns
        the content as a list as if it were ipython code
        """
        output = []
        savefig = False # keep up with this to clear figure
        multiline = False # to handle line continuation
        multiline_start = None
        fmtin = self.promptin

        ct = 0

        # nuke empty lines
        content = [line for line in content if len(line.strip()) > 0]

        for lineno, line in enumerate(content):

            line_stripped = line.strip()
            if not len(line):
                output.append(line)
                continue

            # handle decorators
            if line_stripped.startswith('@'):
                output.extend([line])
                if 'savefig' in line:
                    savefig = True # and need to clear figure
                continue

            # handle comments
            if line_stripped.startswith('#'):
                output.extend([line])
                continue

            continuation  = u'   %s:'% ''.join(['.']*(len(str(ct))+2))
            if not multiline:
                modified = u"%s %s" % (fmtin % ct, line_stripped)
                output.append(modified)
                ct += 1
                try:
                    ast.parse(line_stripped)
                    output.append(u'')
                except Exception:
                    multiline = True
                    multiline_start = lineno
            else:
                modified = u'%s %s' % (continuation, line)
                output.append(modified)

                try:
                    ast.parse('\n'.join(content[multiline_start:lineno+1]))

                    if (lineno < len(content) - 1 and
                        _count_indent(content[multiline_start]) <
                        _count_indent(content[lineno + 1])):

                        continue

                    output.extend([continuation, u''])
                    multiline = False
                except Exception:
                    pass

            continue

        return output