> C-level changes are still required, but just to expose the existing > functions in the GNU history library. After responding to Fred's note, I > realized that what I'm doing in rlcompleter.py: > > import os > histfile = os.getenv("PYTHONHISTORY") > if histfile is not None: > try: > readline.read_history_file(histfile) > except IOError: > pass > import atexit > atexit.register(readline.write_history_file, histfile) > del os, histfile > > could just as easily be done in ~/.pythonrc. Maybe I should retract the > rlcompleter mods and just give something like > > import os > histfile = os.path.join(os.environ["HOME"], ".python_history") > try: > readline.read_history_file(histfile) > except IOError: > pass > import atexit > atexit.register(readline.write_history_file, histfile) > del os, histfile > > as an example in a yet-to-be-written libreadline.tex. Yes, much better. --Guido van Rossum (home page: http://dinsdale.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4