At least on latest macOS Big Sur, the print to console still works without the need to use flush()
Additionally, setting the env var *PYTHONUNBUFFERED* to a non empty value would cause the output to go to the terminal without being buffered. On Fri, May 7, 2021, 11:12 Marcus Ottosson <konstrukt...@gmail.com> wrote: > I recently asked this very same question on the Autodesk forums, and yes, > the solution is to simply call flush() afterwards. :D > > sys.__stdout__.write("Hello world!") > sys.__stdout__.flush() > > It’s available and harmless in Python 2 as well. > > - > > https://forums.autodesk.com/t5/maya-programming/maya-2022-and-sys-stdout-write/m-p/10206828 > > > On Fri, 7 May 2021 at 00:30, Todd Widup <todd.wi...@gmail.com> wrote: > >> so while Maya doesnt open the output window by default now, its still >> there. >> In the past, I used it to print info to instead of the script editor as >> its faster. >> in python 2.7 i used sys.__stdout__.write(), which isnt used in in Python >> 3...so is there a way to print to the output window in Maya 2022 now? >> >> -- >> Todd Widup >> Creature TD / Technical Artist >> todd.wi...@gmail.com >> >> -- >> 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/CABBPk36reADnbxD0%3DB10wJYe4pc1ED%2BWN44KVfHRiFNGzmMW4g%40mail.gmail.com >> <https://groups.google.com/d/msgid/python_inside_maya/CABBPk36reADnbxD0%3DB10wJYe4pc1ED%2BWN44KVfHRiFNGzmMW4g%40mail.gmail.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/CAFRtmOC2Vz70ZucqrcdKTvT3722BVd79iRRBCu0pN64eKd67RQ%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOC2Vz70ZucqrcdKTvT3722BVd79iRRBCu0pN64eKd67RQ%40mail.gmail.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/CAPaTLMQzZtD6TG%2B7Gxaot5QPwZ8SFOzN3gToGZi5hOkHkY0upw%40mail.gmail.com.