Console on Mac isn't doing anything

I hope I’m right in this section. I’m trying to get started with Python (With Tony Mullen’s “Mastering Blender”) and I already have a serious problem. I was trying to run a simple

print "Hello World!"

script in the Blender text editor. So I typed the text in it and pressed Alt+P for running the script but I don’t see anything in the console nor in the terminal.

I also tried opening Blender with the Terminal which was recommended in the book but still I don’t get any code in the Terminal.

I am using Blender 2.48 on a Mac PowerPC 10.5.6.

I updated my Python to 2.6 some days ago and I am using a 2.5 compatible Blender build.

nothing in /Applications/Utilities/Console.app in All Messages? try to hit Reload button :slight_smile:
and after mess a bit with preferences

it should work.
can’t tell from you short description what you have missed.

Nope nothing in the console. I get other messages about Firefox and other apps but nothing about Blender :no:. What can I do in my preferences?

I’m sorry. I am getting Blender requests. It just didn’t show up in the console. When I type “blender” in the search field it filters the blender stuff for me. But still it doesn’t update really fast. It takes a few minutes to get the “Hello world!” in the console. Even if I press refresh it doesn’t refresh. Weird but ok at least something.

Ok got it. The console only updates when i restart it.

if you launch blender via Terminal.app the messages should be instantly in the Terminal.

/Applications/blender/blender.app/Contents/MacOS/blender

if you launch blender via Terminal.app the messages should be instantly in the Terminal.

/Applications/blender/blender.app/Contents/MacOS/blender

Here’s a description of how I set things up, so clicking Blender in the dock gives me a terminal for output. It takes two minutes.

For background: Here, this issue was reported as a bug. It had been before, and there’s generally a lot of confusion. I posted this explanation / reply:

There is indeed some confusion on this issue. The issue has even been submitted again after this one was closed:

http://projects.blender.org/tracker/?func=detail&atid=125&;aid=18689&group_id=9 (also closed)

Maybe I can clear a couple of things up:

Console.app / system.log is simply a bad place for this sort of output. The system.log is a useful place to see what your computer was doing at any given time, why an app crashed, etc. However, this log contains data from any app / process, and is continuously written to disk (as a large file including the backlog).

This means that to see things in the log, the log process has to process them first. Naturally, if this wasn’t done intelligently / with a buffer, every process would write to the disk several times a second - very bad for performance. So, the logging is
done in the background and asynchronously, no promises made on when precisely things will appear, just that they eventually will, and in the correct order.

If you program your own app in XCode, and dump stuff to the log, you have the same issue - you can get the output in system.log, but you can’t dictate when it appears. At least, if you try to, performance suffers. So, in XCode, use the debugger, which has a terminal directly showing output without having to write to the log. Memory vs. hard disk / focused task vs. general system tool.

We can do the same for Blender.

I found out how, and have put together sort of a walk-through on how to get a double-clickable application with the right icon that launches a terminal output window, here:

http://blenderartists.org/forum/showpost.php?p=1267071&postcount=15

(It takes all of two minutes).

The issue remains one of education - “console” is sometimes used interchangeably with “terminal” or “shell”, to describe the output window you see on e.g. Windows. Yet, on OS X you decidedly want a Terminal window, not a Console. (It doesn’t help that Ton apparently mistakenly swapped the terms, in the comment above).

Now, this should be made clear somewhere, and we should spend some energy educating about this issue (since the other option - making it work well in console.app means pleading with Apple, not Blender foundation.)

Except, as Campbell noted when he closed the other bug - Blender 2.5 has a built-in console planned. Much nicer, and the same for all platforms. So any solution we get now, will be moot in 2.5.

Hope this helps.

I think I found an easier solution, but I´m a bit of a newbie with these thing. So, maybe I’m saying something that has been mentioned already.

  • In the Finder, hit cmd+A,
  • expand the Blender folder
  • right click (or CTRL-click) on the Blender ICON
  • choose “explore package”
  • a finder window opens
  • expand “contents”
  • expand “MacOS”
  • dubbleclick on the black Blender Icon
  • The terminals opens a windows and opens Blender on top of it, leaving the terminal window accesible.

Sounds more complicated then it is. :slight_smile:

Well, clicking a dock icon is easier than that :wink:

Well,… not much… because: once you clicked your way to the terminal icon, you can create an alias and put that on your desktop or in Applications folder.

i’m ok with @daredemoikari. all messages appear in the console while blender is launch with the Terminal.

usr1-powerbook-g4-12:~ usr1$ /Applications/blender/blender.app/Contents/MacOS/blender
Compiled with Python version 2.3.5.
Checking for installed Python… got it!
[[Object “Camera”], [Object “Cube”], [Object “Lamp”]]
[[Object “Camera”], [Object “Cube”], [Object “Lamp”]]