print to new line using mel.eval('print "...\n"') not working

2,642 views
Skip to first unread message

martin.puttkammer

unread,
Mar 14, 2008, 9:01:33 PM3/14/08
to python_inside_maya
using:
print "...\n"

in mel produces three dots and a line break

using:
import maya.mel as mel
mel.eval(' print "...\n"')

from the python tab produces an error.

if printing without new line then the history of the script editor
gets messed up.
what am i missing?

thanks,
martin

Ofer Koren

unread,
Mar 14, 2008, 9:15:04 PM3/14/08
to python_in...@googlegroups.com
You have to escape the backslash, so:

import maya.mel as mel
mel.eval(' print "...\\n"')

Martin Puttkammer

unread,
Mar 14, 2008, 9:19:01 PM3/14/08
to python_in...@googlegroups.com
so easy and so annyoing.

thanks Ofer
Reply all
Reply to author
Forward
0 new messages