[Python-Dev] oh, and any interest in my readline history stuff?
Guido van Rossum
guido@beopen.com
Wed, 05 Jul 2000 20:48:29 -0500
> 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,
[Fred]
> Skip,
> "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 ;).
On the other hand, bash reads .profile and .bashrc and a few other
files by default, while Python reads such a file only when
$PYTHONSTARTUP is set. I actually like this.
--Guido van Rossum (home page: http://dinsdale.python.org/~guido/)