On Fri, 9 Jul 2021, 5:05 am vince touache, <fruityfr...@gmail.com> wrote:

> hi all,
>
> With previous versions of maya, I was using a lot
> print 'foo',
> with the coma in the end, which was forcing my print to show up in the
> 1-line listener embedded to the maya main window (just like a
> mel.eval('print "foo";') would do).
> However, with python 3 and the new print() syntax, this trick doesn't
> seem to work anymore.
>


https://docs.python.org/3/library/functions.html#print

The python3 print function accepts an end parameter that defaults to a
newline. So just set it to some other character.

print("my line", end=" ")


> Is there another way I could make sure my prints are visible not only from
> the script editor but also from the main windows? (other than using
> mel.eval)?
>
> cheers
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/d4761b10-aa3a-45d7-a5ca-b7ad576b1076n%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/d4761b10-aa3a-45d7-a5ca-b7ad576b1076n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1fDhqH-bQptB0mhZFfkA-%2B%3Dz_Wxn4SP%3DsWNUsrE2mdBg%40mail.gmail.com.

Reply via email to