Blender console output not shown

Hi Everyone,

In blender 4.1 the console not shown the print result. I have test the code using these script in text editor but it doesn’t show the output text in console window.

import bpy

def execute(self, context):
test = “Hello, this is a test”
print(test)
Here I attached screenshot also. Please review and me know.

Regards,
Vasanth

Hi,

this script alone will not do anything! You do not call the execute method at any point…

What will work is this:

import bpy

def execute():
    test = "Hello, this is a test"
    print(test)
    
execute()

Thanks for your reply. but still it’s not print the output in console window. I don’t know why it’s happened. In older version blender there is an option to enable print console in addon preferences, but 4.1?

Regards,
Vasanth

Print statements run from the Text Editor will print out in the System Console, not in Blender’s Python Console or Info view.

If you’re on Linux, you need to start Blender from the command prompt, if you’re on Windows you can click ‘Window > Toggle System Console’.

There are addons that will redirect the standard output from your system console back into the Blender console so that you don’t have to do one of the steps above, but AFAIK it was never a native feature of Blender, maybe you had Code Editor, or a similar addon installed in a previous version?

If you run code in the Python Console in Blender it will print statements back into that same console, but any prints run from the Text Editor will go, by default, only to your system console.