Skip to main content
6 events
when toggle format what by license comment
Jun 1, 2022 at 9:48 comment added MestreLion For those saying this doesn't work, it's supposed to be added to ~/.pythonrc so it runs before every session.
Mar 6, 2022 at 19:00 comment added Luke Davis This works for me, and can be applied to every session with an alias. For example: alias python='python -i -c "import readline; readline.set_auto_history(False)".
Dec 8, 2019 at 20:51 comment added Boann Doesn't work. This doesn't stop the file being saved, and instead it breaks the history during the session. In any case, Python silently turns the "feature" back on next time you run it.
Sep 4, 2019 at 18:28 comment added jamesdlin This disables history entirely. Personally I'm fine with history being preserved in my interpreter session, but I just don't want my history written to disk and preserved across sessions.
Sep 2, 2019 at 8:58 comment added z0r That's good for the Python shell, but beware: it doesn't seem to work in ipython.
Apr 9, 2018 at 16:48 history answered Colin Watson CC BY-SA 3.0