Print to Python Console

$3+
1 rating

What is this for

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 add-on.

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 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 an infinite recursion Blender crash.

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

Couldn't write to the Python console from the operator's draw function.

Solution: see the system console


Demonstration video

https://www.youtube.com/watch?v=5PX9kSkIV1c

Add-on web page

For more information, please visit https://b3d.interplanety.org/en/blender-add-on-print-to-python-console/

I would love to hear your feedback and issues to make the add-on better.


Installation

  • Download *.zip archive with the add-on distributive
  • In Blender: The "Preferences" window — Add-ons — Install... — specify downloaded archive


Location

"3D Viewport" window - N-panel - the "PtoPC" tab

Current 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

$
I want this!
Size
17.9 KB
Copy product URL

Ratings

5.0
(1 rating)
5 stars
100%
4 stars
0%
3 stars
0%
2 stars
0%
1 star
0%
$3+

Print to Python Console

1 rating
I want this!