How can I display what happens in the system console inside blender's console?
First redirect output from Python's stdout into your own buffer,see: How to redirect output from &#39;bpy.ops.*&#39;?
Then run bpy.ops.console.scrollback_append with the console space set using an override, see: https://blender.stackexchange.com/a/31398/55




Hello world example that prints text into the first console found.

import bpy

def console_get():
    for area in bpy.context.screen.areas:
        if area.type == 'CONSOLE':
            for space in area.spaces:
                if space.type == 'CONSOLE':
                    return area, space
    return None, None


def console_write(text):
    area, space = console_get()
    if space is None:
        return

    context = bpy.context.copy()
    context.update(dict(
        space=space,
        area=area,
    ))
    for line in text.split("\n"):
        bpy.ops.console.scrollback_append(context, text=line, type='OUTPUT')

console_write("Hello World")