diff --git a/Lib/sqlite3/__main__.py b/Lib/sqlite3/__main__.py index 9f57e7d6d58..3228dbc09d5 100644 --- a/Lib/sqlite3/__main__.py +++ b/Lib/sqlite3/__main__.py @@ -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}