Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable keyboard navigation in interactive repl by default #91

Closed
wants to merge 2 commits into from
Closed

Enable keyboard navigation in interactive repl by default #91

wants to merge 2 commits into from

Conversation

kevgathuku
Copy link

@kevgathuku kevgathuku commented Jul 17, 2019

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!

Call sys.__interactivehook__ in Python 3 repls to enable
keyboard navigation through previous commands in the interactive
console
@kevgathuku
Copy link
Author

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

better_exceptions/__main__.py Show resolved Hide resolved
@kevgathuku
Copy link
Author

kevgathuku commented Jul 24, 2019

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

@kevgathuku kevgathuku closed this Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navigation Keys are not working in better-exception Repl(MacOs)
2 participants