←back to thread

89 points Numerlor | 1 comments | | HN request time: 0.221s | source
1. devnonymous ◴[] No.41853095[source]
I replied here earlier with my own pet project to essentially say that you don't need a whole lot of complexity to solve for QOL improvements in the console but was promptly downvoted, I thought that was fair and so deleted my comment.

However, now I do feel the need to say this - you really do not need a whole lot to enhance your productivity on the python REPL by a large factor, if you take advantage of some simple built-in facilities:

A. Understand the use of the PYTHONSTARTUP environment variable. This alone is a big advantage. It'll allow you to you automatically import often needed modules and declare helpers that you always seem to need.

B. Once you've gotten used to that, Wrap the built-in module code (or I presume pyrepl) to add the little things that you need and point PYTHONSTARTUP to it

C. Enjoy

At the risk of being downvoted again (not that it matters, so won't delete this time), here again, shameless plug - https://github.com/lonetwin/pythonrc