Skip to content

Print To Python Console

by Nikita Akimov·Workflow

Illustrative cover generated by AnyPlugins — no product screenshot available.

Why we like it

Print To Python Console earns its place in the superhive library as a focused developer utility: it does one thing, routing print and error output into Blender's Python Console, and gives you buttons plus per-type toggles to control it. The documented depsgraph_update caveat is worth reading before relying on it inside event handlers.

What is Print To Python Console?

Print To Python Console is a Blender add-on by Nikita Akimov that sends print output and error messages to the Python Console window rather than only the system console. Install and activate it, and errors and text output appear in the Python Console.

The add-on adds a "PtoPC" panel with two buttons for temporarily activating and deactivating the redirection. "Print to Python Console" enables output to the Python Console, while "Print to System Console" returns errors and text output to the default system console. In the properties panel, you can enable or disable output separately for error messages and the print function.

You'll find the controls in the 3D Viewport N-panel under the "PtoPC" tab. Note the documented limitations: it cannot be used with the depsgraph_update_post and depsgraph_update_pre handlers that contain print or errors, since output raises the depsgraph_update event and triggers an infinite recursion crash, so redirection should be disabled while working with those events. Output also cannot be written from an operator's draw function. The add-on lists support for Blender 2.82 through 4.1.

Who is Print To Python Console best for?

Print To Python Console is best for blender add-on developers and scripters who want print output and error messages in the Python Console window instead of only the system console.

How much does Print To Python Console cost?

Print To Python Console is completely free to download and use.

Key features

  • Redirects print output and error messages to the Python Console window
  • "PtoPC" panel with two buttons for temporarily activating and deactivating output redirection
  • "Print to Python Console" button enables output to the Python Console; "Print to System Console" returns output to the default system console
  • Properties panel toggles for enabling or disabling output separately for error messages and the print function
  • Accessible from the 3D Viewport N-panel under the "PtoPC" tab
  • Documentation included

Tags

#Blender#Python Console#add-on#development#print output#error messages#console#workflow

Frequently asked questions

Which Blender versions does Print To Python Console support?

Print To Python Console lists compatibility across a wide span of Blender releases, from 2.82 up through 4.1, including the 2.9x series and the full 3.x line. If you run one of these versions, you can install and activate the add-on to route print output and error messages into the Python Console window. The current add-on version listed is 1.1.0. For any release outside this range, check the developer's page for current support before installing.

Is Print To Python Console free to use?

Print To Python Console is listed as free here, and its license is GPL. Because pricing and licensing can change over time, check the developer's page for the current terms before you download. Once installed and activated, the add-on redirects print output and error messages to the Python Console window, and gives you buttons and properties for turning that redirection on and off whenever you need it.

Where does Print To Python Console appear in Blender?

Print To Python Console lives in the 3D Viewport window under the N-panel, in a tab labelled "PtoPC". That panel holds two buttons for temporarily activating and deactivating output redirection: "Print to Python Console" enables output to the Python Console, while "Print to System Console" returns errors and text output to the default system console. A separate properties panel lets you enable or disable output for error messages and the print function independently.

Does Print To Python Console work with depsgraph_update event handlers?

Print To Python Console cannot be used with the depsgraph_update_post and depsgraph_update_pre event handlers when those handlers contain the print function or errors. Text output to the Python Console raises the depsgraph_update event itself, which causes an infinite recursion and crashes Blender. The workaround is to temporarily disable output to the Python Console while working with depsgraph_update events. Separately, output could not be written to the Python Console from an operator's draw function, where the system console serves as the fallback.

Alternatives to Print To Python Console

Also in Workflow for Blender.

Similar plugins