mirror of
https://github.com/python/cpython.git
synced 2025-11-13 07:26:31 +00:00
#10034: import readline in longer example.
This commit is contained in:
parent
b441554835
commit
a102ae3426
1 changed files with 1 additions and 0 deletions
|
|
@ -195,6 +195,7 @@ normally be executed automatically during interactive sessions from the user's
|
||||||
:envvar:`PYTHONSTARTUP` file. ::
|
:envvar:`PYTHONSTARTUP` file. ::
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import readline
|
||||||
histfile = os.path.join(os.environ["HOME"], ".pyhist")
|
histfile = os.path.join(os.environ["HOME"], ".pyhist")
|
||||||
try:
|
try:
|
||||||
readline.read_history_file(histfile)
|
readline.read_history_file(histfile)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue