diff options
author | Ngalim Siregar <ngalim.siregar@gmail.com> | 2019-07-21 22:37:28 +0700 |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2019-07-21 11:37:28 -0400 |
commit | 35b87e6001bd991f625abe305951c77ddeb9a9c5 (patch) | |
tree | 03f4ffc0e8b45197b82fbe2affdf4b36a758b041 /Lib/idlelib/query.py | |
parent | 02c91f59b6f6e720a9e89635e00c55bcf7f932a8 (diff) | |
download | cpython-git-35b87e6001bd991f625abe305951c77ddeb9a9c5.tar.gz |
bpo-37627: Initialize IDLE Custom Run dialog with previous entries (#14870)
Repeat the command line arguments most recently entered before so the user can edit them.
Diffstat (limited to 'Lib/idlelib/query.py')
-rw-r--r-- | Lib/idlelib/query.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/idlelib/query.py b/Lib/idlelib/query.py index d74084feed..097e6e61e3 100644 --- a/Lib/idlelib/query.py +++ b/Lib/idlelib/query.py @@ -325,9 +325,13 @@ class CustomRun(Query): """ # Used in runscript.run_custom_event - def __init__(self, parent, title, *, cli_args='', + def __init__(self, parent, title, *, cli_args=[], _htest=False, _utest=False): - # TODO Use cli_args to pre-populate entry. + """cli_args is a list of strings. + + The list is assigned to the default Entry StringVar. + The strings are displayed joined by ' ' for display. + """ message = 'Command Line Arguments for sys.argv:' super().__init__( parent, title, message, text0=cli_args, |