Hello guys!
I would like to print PyInstrument’s output in Streamlit, but it doesn’t seem to work.
For context, Pyinstrument is a Python profiler -> https://github.com/joerick/pyinstrument
Here’s a screenshot of the code:
So print(profiler.output_text(unicode=True, color=True))
prints the desired output to the terminal (#2 in screenhost above)
yet its streamlit transalation via st.write
-> st.write(profiler.output_text(unicode=True, color=True))
doesn’t print properly in Streamlit, see screenshot below::
Here’s the corresponding code: https://pastebin.com/r4BVS0Zb
Do you know if there would be a workaround for this?
Thanks in advance
Charly