Skip to content

Commit 8483725

Browse files
committed
Added persistent history file to main.py
1 parent 7b9a51a commit 8483725

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ htmlcov
2525
# mypy plugin for PyCharm
2626
dmypy.json
2727
dmypy.sock
28+
29+
# cmd2 history file used in main.py
30+
cmd2_history.txt

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77

88
# Set "use_ipython" to True to include the ipy command if IPython is installed, which supports advanced interactive
99
# debugging of your application via introspection on self.
10-
app = cmd2.Cmd(use_ipython=True)
10+
app = cmd2.Cmd(use_ipython=True, persistent_history_file='cmd2_history.txt')
1111
app.locals_in_py = True
1212
app.cmdloop()

0 commit comments

Comments
 (0)