Print to Python Console

Blender 3D add-on for redirecting the print output and the error messages to the Python Console window.

Add-on functionality

To display errors and print output in the Python Console window just install and activate the addon.

Two buttons in the add-on “PtoPC” panel are used to temporarily activating and deactivating output redirection to the Python Console. By clicking the “Print to System Console” button, the errors and the text output will be returned back to default - only to the system console. Pressing the “Print to Python Console” button will enable output to the Python Console.

In the add-on’s properties panel, you can enable/disable output to the Python Console separately for error messages and the print function.

Known issues

This add-on cannot be used with the event handlers “depsgraph_update_post” and “depsgraph_update_pre” having the print function or errors in them. Text output to the Python Console raises the depsgraph_update event itself, so this results in infinite recursion Blender crash.

Solution: temporarily disable output to the Python Console working with depsgraph_update events.

Add-on web page

For more information please visit

Gumroad

Demonstration video

Current add-on version:

1.0.2.

Blender versions:

2.82, 2,83, 2.90, 2.91

2 Likes

Hi @Korchy.

Could it be possible to let the user choose a custom color for the messages that are redirected to the Python Console?
(to differentiate them from the default messages that appear in the Python Console).

Thanks

Hi!
No, as I know. We can only change the whole color through the theme settings.

Is this still an issue?

Text output to the Python Console raises the depsgraph_update event itself, so this results in infinite recursion Blender crash.

I assume that is the reason why Blender crashes with reverting scene when the “run in console” addon is enabled. I am just wondering if your addon has a workaround for it.

Yes, unfortunately, this issue is still alive. I don’t know how to resolve it.

1 Like

Updated to v. 1.0.2.

  • Fixing bugs.
1 Like