Skip to content

Commit 254e30c

Browse files
gh-109151: Enable readline in the sqlite3 CLI (GH-109152)
1 parent e9f2352 commit 254e30c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Lib/sqlite3/__main__.py

+4
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ def main(*args):
116116
else:
117117
# No SQL provided; start the REPL.
118118
console = SqliteInteractiveConsole(con)
119+
try:
120+
import readline
121+
except ImportError:
122+
pass
119123
console.interact(banner, exitmsg="")
120124
finally:
121125
con.close()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Enable ``readline`` editing features in the :ref:`sqlite3 command-line interface <sqlite3-cli>` (``python -m sqlite3``).

0 commit comments

Comments
 (0)