direct output to python console

Hey Everyone,
I apologize if this has been covered, I haven’t been able to find information about it elsewhere so I figured I’d ask you.

Is there any way to get output (such as print(“hello”)) to be directed to the python console? Right now it doesn’t seem to appear anywhere in the blender UI, I have to open the system console OR launch blender from the terminal to view the output.

I’m using 2.58.

Thanks!

yep, it would be sweet to output print() statements from Text Editor to the console, but not at present. Nothing wrong with starting blender from a terminal :slight_smile:

:yes:

this thread remembered me something for 2.4 about kindof plugin for blended cities. that way it really reload, not like multifiles addons:p sure it’s a weird snippet I agree.

snippet :

import bpy

class ConsoleRun(bpy.types.Operator):
    bl_idname = "console.runtext"
    bl_label = "Console Run Text"
 
    textname = bpy.props.StringProperty()
 
    def execute(self, context):
        txt = bpy.data.texts[self.textname]
        torun = ''
        for l in txt.lines :
            torun += l.body+'
'
        #print(torun)
        exec(torun)
        return {'FINISHED'}
    
bpy.utils.register_class(ConsoleRun)

but I cant’ make it work for real script :wink:

Hi lttleneo, whats the problem with a real script?, this seems to run fine.

very cool!

Ohhh… clever ! Well done !

:slight_smile: I tried with an addon of mine, it complains about namespaces I think, and property update function in my case.

It does not seem to work for me…