2

In Maya, with Python, I can write to the Command Response Window (I think it's called that - the single line window at the bottom right of the screen):

import sys

def console_it(s):
  sys.stdout.write(s)

console_it("Hello world")

What's the equivalent using MEL?

The following just prints to the Script editor History Window - which is not what I'm after.

global proc console_it(string $s)
{
    print($s);
}
Andy Jazz
  • 49,178
  • 17
  • 136
  • 220
Ghoul Fool
  • 6,249
  • 10
  • 67
  • 125

1 Answers1

2

I can't find a direct equivalent for sys.stdout.write(s).

But you could try a warning command:

global proc console_it(string $s)
{
    warning $s;
}

console_it("Hello World")

P.S.

Or a trace command, as @robthebloke suggested.

Andy Jazz
  • 49,178
  • 17
  • 136
  • 220