Qix- / better-exceptions

Pretty and useful exceptions in Python, automatically.
MIT License
4.59k stars 203 forks source link

Enable keyboard navigation in interactive repl by default #91

Closed kevgathuku closed 5 years ago

kevgathuku commented 5 years ago

Call sys.__interactivehook__ in Python 3 Repls to enable keyboard navigation through previous commands

This should fix #90

I'm not entirely sure if this is everything, but I tried this locally and the REPL was navigable with the up and down arrows. Also, this works for Python 3 only, since the sys.__interactivehook__ function was added in Python 3

Feedback welcome!

kevgathuku commented 5 years ago

Seems this might not be the best way to do it, due to the failing tests. For reference, this is how virtualenv did it: https://github.com/pypa/virtualenv/pull/1239/files

kevgathuku commented 5 years ago

Closing this for now due to the failing tests. Will hopefully re-open once I find a better solution