Skip to content

Commit

Permalink
Correct atexit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
dcramer committed May 6, 2013
1 parent 3fe3452 commit 2d35873
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/pythonrc.py
Expand Up @@ -17,4 +17,8 @@

readline.set_history_length(1024 * 5)

atexit.register(lambda x=history: readline.write_history_file(x))
def write_history(x):
import readline:
readline.write_history_file(x)

atexit.register(write_history)

0 comments on commit 2d35873

Please sign in to comment.