Text Editor Output

Hello,

I’m new to coding Python and I seem to stumbled on the most basic step. In Blender when I open the text editor and write a super simple line of code such as…

a = “hello world”

print a

I get no output. Is there a way to view the output of that? I think it will be hard to write code if I can’t receive any? Anyone have any insight? If so please let me know.

Best Regards,

Stephen

The output in this case coes to the console (or whatever it’s called on your system), in other words you should be able to see it in the .log file. If you start Blender from command line then these messages will appear in your “term” window.

you have to press alt-p when the mouse is in the text editor window to run the script.

in “Microsoft Windows”, the other blender window is for script output.

Alternately you can use the “Interactive Console” script (go to scripts window - scripts menu - system - Interactive console) to test basic python within blender like the commands you were trying.

ps if you want to use blender functions you have to type:
import Blender
you can then type:
print dir(Blender)
to see all the blender functions.

OK, I see. I was launching Blender via an icon in OSX, so that must be why I didn’t get the console window. I have it open on a windows machine and I see it! Thank you very much for your help!

Best Regards,

Stephen

OSX users. Under >Applications>Utilities there is a console window program. Start that and it will show you the output.

Thanks again for the help!

Stephen