Skip to content

Commit

Permalink
pythongh-102628: Fix sqlite3 CLI prompt in IDLE on Windows (python#10…
Browse files Browse the repository at this point in the history
  • Loading branch information
erlend-aasland committed Apr 27, 2023
1 parent 2cf945b commit 56c7176
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Lib/sqlite3/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ def main():
db_name = repr(args.filename)

# Prepare REPL banner and prompts.
eofkey = "CTRL-Z" if sys.platform == "win32" else "CTRL-D"
if sys.platform == "win32" and "idlelib.run" not in sys.modules:
eofkey = "CTRL-Z"
else:
eofkey = "CTRL-D"
banner = dedent(f"""
sqlite3 shell, running on SQLite version {sqlite3.sqlite_version}
Connected to {db_name}
Expand Down

0 comments on commit 56c7176

Please sign in to comment.