I want to keep the functionality, but change the location of ~/.python_history to $XDG_DATA_HOME/python/python_history.
This gave me the following idea:
I could create $XDG_CONFIG_HOME/python/pythonrc and point $PYTHONSTARTUP to it.
In there I want to replace the functions readline.read_history_file, readline.write_history_file and readline.append_history_file.
Is there way to replace these functions with themselves, containing a custom filename argument?
If not, do you have another idea how to approach this?