prompt-toolkit / ptpython

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

Refactor output printer so that it can render big outputs without memory issues. #562

Closed jonathanslenders closed 11 months ago

jonathanslenders commented 11 months ago

Previously, an expression like b'\x90' * 40_000_000 would kill ptpython because it rendered the whole output at once. This implementation streams the rendering logic while it's paginating.

This PR also contains typing fixes as well as asyncio-related improvements (in separate commits).