diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2018-03-05 16:02:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-05 16:02:46 (GMT) |
commit | 22c82be5df70c3d51e3f89b54fe1d4fb84728c1e (patch) | |
tree | 9ba02699250449f1ab243049a5785b46ecb3b0af /Misc/NEWS.d/next | |
parent | 18fd89246333bfa1b76c1623df689214f3ce2bf3 (diff) | |
download | cpython-22c82be5df70c3d51e3f89b54fe1d4fb84728c1e.zip cpython-22c82be5df70c3d51e3f89b54fe1d4fb84728c1e.tar.gz cpython-22c82be5df70c3d51e3f89b54fe1d4fb84728c1e.tar.bz2 |
bpo-32984: IDLE - set __file__ for startup files (GH-5981)
Like Python, IDLE optionally runs one startup file in the Shell window
before presenting the first interactive input prompt. For IDLE,
option -s runs a file named in environmental variable IDLESTARTUP or
PYTHONSTARTUP; -r file runs file. Python sets __file__ to the startup
file name before running the file and unsets it before the first
prompt. IDLE now does the same when run normally, without the -n
option.
Diffstat (limited to 'Misc/NEWS.d/next')
-rw-r--r-- | Misc/NEWS.d/next/IDLE/2018-03-05-01-29-05.bpo-32984.NGjgT4.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/IDLE/2018-03-05-01-29-05.bpo-32984.NGjgT4.rst b/Misc/NEWS.d/next/IDLE/2018-03-05-01-29-05.bpo-32984.NGjgT4.rst new file mode 100644 index 0000000..15d40b7 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2018-03-05-01-29-05.bpo-32984.NGjgT4.rst @@ -0,0 +1,7 @@ +Set ``__file__`` while running a startup file. Like Python, IDLE optionally +runs one startup file in the Shell window before presenting the first interactive +input prompt. For IDLE, ``-s`` runs a file named in environmental variable + :envvar:`IDLESTARTUP` or :envvar:`PYTHONSTARTUP`; ``-r file`` runs +``file``. Python sets ``__file__`` to the startup file name before running the +file and unsets it before the first prompt. IDLE now does the same when run +normally, without the ``-n`` option. |