[Python-Dev] oh, and any interest in my readline history stuff?
Fred L. Drake, Jr.
Wed, 5 Jul 2000 20:21:14 -0400 (EDT)
Skip Montanaro writes:
> Along the same lines, I have some pretty simple mods to readline.c and
> rlcompleter.py that use atexit to automatically save the current history to
> the file identified by the PYTHONHISTORY environment variable. (If unset,
"bash" doesn't make me set a variable to control saving of history
to ~/.bash_history; I'd be perfectly happy if Python wrote
~/.python_history by default, and simply allowed me to turn it off
somehow (either from my $PYTHONSTARTUP script or a separate
environment variable). There should be a reasonable default size to
the history (say, 2000 lines ;), and a way to set that as well.
Perhaps this is reasonable: in rlcompleter (or whereever this stuff
goes), have a variable history_size that is set based on
$PYTHONHISTORYSIZE if set, or 2000 if not. If the variable is set to
0, there is no history saving (or loading), and non-numeric values
(like "true" ;) mean "use the default" (which is at least 2000 ;).
Fred L. Drake, Jr. <fdrake at beopen.com>
BeOpen PythonLabs Team Member