prompt-toolkit / ptpython

A better Python REPL
BSD 3-Clause "New" or "Revised" License
5.19k stars 277 forks source link

Use sys.displayhook for converting result to string #570

Open bogdan-nikitin opened 7 months ago

bogdan-nikitin commented 7 months ago

Fix for #488

Some libraries, like SymPy, redefine sys.displayhook to change printing behavior.

Use sys.displayhook to convert the result to a string in OutputPrinter._format_result_output.