Display Python output in python console
This seems like it should be a given, but when I run python scripts it would only make sense that the output should appear in the python console. The fact that I have to use a completely separate window to debug python scripts seems a little silly to me.
14 Comments
I will probably tackle this issue in my GSoC. My soluion would be showing output in Info editor. Keep an eye on developer.blender.org/T78164 for updates.
Sometimes you do see output from the script in the info section. Strangely, it shows up only after you type something in the script editor
If you start blender by clicking on some icon (which is the "normal" way for most users I suppose) you don't even have a window to find when something goes wrong which makes scripting virtually impossible; "Python script failed, check the message in the system console" is all you get.
* @Georg Bernhard * You can open the system console by going "Window > Toggle system console" so there is a way it's just really ugly, since it breaks UI conventions of the rest of the program, and there isn't even a way to pin it to always stay on top
* @Zach Hixson * {attachment Screenshot_2020-11-04_at_182649png} I don't seem to have that option...
* @Georg Bernhard * Weird. I'm on Windows if that matters {attachment expng}
* @Zach Hixson * I'm sorry! I'm on macOS! ;-)
Addons that can do that:
gist.github.com/Andrej730/073a92ec0e30328dcf5f510047084c1f
b3d.interplanety.org/en/blender-add-on-print-to-python-console/
I am with you!
and the os console reopening behind when doing toggle console...grrrr when doing an add-on an having multiple windows I lose a lot of energy with this
I think it's best to keep them separate, otherwise the top level commands would become too watered down with print statements etc from addons and other scripts.
Perhaps a keep on top option for the window would be a good idea though for those who don't have multiple monitors. Or alternatively two modes for the python console, one for script output and the other for top level commands, this way they could stay seperate without the need for a seperate window.
Sounds like a great idea to me. If it gets too diluted as 3d illusions mentioned you could have it like in maya, an option to be verbose or not. By default its off.
If that is too cluttered we could also put it into a separate panel type.
* @keen * Even if it was a separate window, at least include it in the list of other windows that I can split and view with the rest of the interface. The fact that I have to keep alt-tabbing into another window really just drives me crazy
* @3d -illusions.co.uk * I would assume log levels to be configureable