Blender 3D add-on for redirecting the print output and the error messages to the Python Console window. Yon don’t need to switch to the system console to check outputs now.
The “Print to Python Console” add-on is intended for Blender scripts and add-ons developers.
By default, error messages and the print function output are made to the system console, which can be shown by the “Window – Toggle System Console” in the Blender main menu. However, this is not always convenient. The “Print to Python Console” add-on allows you to redirect the output from the system console to the Python Console window, which is much more convenient and clear.
Add-on functionality
To display errors and print output in the Python Console window, just install and activate the add-on.
Two buttons in the add-on “PtoPC” panel (3D Viewport window) 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 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.
When output to the Python Console window is enabled, it duplicates both to the Python Console and to the system console if the “Keep default output” checkbox is on in the add-on preferences panel. If this checkbox is off, the default output to the system console is blocked.
Demonstration video
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 an infinite recursion Blender crash.
Solution: temporarily disable output to the Python Console, working with depsgraph_update events.
Blender can’t write to the Python console from the operator’s draw function and while rendering.
Solution: see the system console.
Current add-on version
1.1.0.
Blender versions
2.82, 2.83, 2.90, 2.91, 2.92, 2.93, 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 4.0, 4.1
Location and call
“3D Viewport” window – N-panel – the “PtoPC” tab
Installation
- Download the *.zip archive with the add-on distributive.
- The “Preferences” window — Add-ons — Install… — specify the downloaded archive.
Version history
1.1.0.
- Updated for compatibility with Blender 4.0.
1.0.2.
- Fixing bugs.
1.0.1.
- Strings breaking correction
1.0.0.
- This release.
Seems not to work in Blender 3.0. An update would be nice!
I use it in 3.0 and 3.1, it works.
Do you have any errors?
I installed it yesterday and couldn’t get it to run. Reload scripts, restart Blender… Now it works perfectly. Seems I needed kind of your blessing!
Thanks for your answer and all the stuff you post here.