Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Lib/idlelib/pyshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -1674,6 +1674,10 @@ def main():
if filename and os.path.isfile(filename):
shell.interp.execfile(filename)
if cmd or script:
# Let the startup file finish first: the command or script
# is to run after it, in its namespace (gh-68453).
while shell.executing:
root.update()
shell.interp.runcommand("""if 1:
import sys as _sys
_sys.argv = {!r}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix running IDLE with the -s option together with -c, -r or -: the command
or script now runs after the startup file, without an error dialog and
without restarting the shell.
Loading