diff options
author | Georg Brandl <georg@python.org> | 2009-03-15 21:51:48 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-03-15 21:51:48 (GMT) |
commit | 09827eb55e4c5ceca5af2edd8bf7d129d4ecdf3c (patch) | |
tree | 4eeb25b71b7d864a6fac7b87f7c8e7263b8188ac | |
parent | 8db96b5969538f1bba98ba5cdb7af1c66ff7875b (diff) | |
download | cpython-09827eb55e4c5ceca5af2edd8bf7d129d4ecdf3c.zip cpython-09827eb55e4c5ceca5af2edd8bf7d129d4ecdf3c.tar.gz cpython-09827eb55e4c5ceca5af2edd8bf7d129d4ecdf3c.tar.bz2 |
#5276: document IDLESTARTUP and .Idle.py.
-rw-r--r-- | Doc/library/idle.rst | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Doc/library/idle.rst b/Doc/library/idle.rst index 413750f..1b78fb9 100644 --- a/Doc/library/idle.rst +++ b/Doc/library/idle.rst @@ -253,6 +253,24 @@ Shell colors: black +Startup +------- + +Upon startup with the ``-s`` option, IDLE will execute the file referenced by +the environment variables :envvar:`IDLESTARTUP` or :envvar:`PYTHONSTARTUP`. +Idle first checks for ``IDLESTARTUP``; if ``IDLESTARTUP`` is present the file +referenced is run. If ``IDLESTARTUP`` is not present, Idle checks for +``PYTHONSTARTUP``. Files referenced by these environment variables are +convenient places to store functions that are used frequently from the Idle +shell, or for executing import statements to import common modules. + +In addition, ``Tk`` also loads a startup file if it is present. Note that the +Tk file is loaded unconditionally. This additional file is ``.Idle.py`` and is +looked for in the user's home directory. Statements in this file will be +executed in the Tk namespace, so this file is not useful for importing functions +to be used from Idle's Python shell. + + Command line usage ^^^^^^^^^^^^^^^^^^ |