rest25/tutorial/interactive.rst => rest262/tutorial/interactive.rst
110object.  Note that this may execute application-defined code if an object with a
111:meth:`__getattr__` method is part of the expression.
112
113A more capable startup file might look like this example.  Note that this
114deletes the names it creates once they are no longer needed; this is done since
115the startup file is executed in the same namespace as the interactive commands,
116and removing the names avoids creating side effects in the interactive
117environment.  You may find it convenient to keep some of the imported modules,
n118-such as :mod:`os` (XXX reference: ../lib/module-os.html), which turn out to be
n118+such as :mod:`os`, which turn out to be needed in most sessions with the
119-needed in most sessions with the interpreter. ::
119+interpreter. ::
120
121   # Add auto-completion and a stored history file of commands to your Python
122   # interactive interpreter. Requires Python 2.0+, readline. Autocomplete is
123   # bound to the Esc key by default (you can change it - see readline docs).
124   #
125   # Store the file in ~/.pystartup, and set an environment variable to point
t126-   # to it:  "export PYTHONSTARTUP=/max/home/itamar/.pystartup" in bash.
t126+   # to it:  "export PYTHONSTARTUP=/home/user/.pystartup" in bash.
127   #
128   # Note that PYTHONSTARTUP does *not* expand "~", so you have to put in the
129   # full path to your home directory.
130
131   import atexit
132   import os
133   import readline
134   import rlcompleter
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op