rest25/library/user.rst => rest262/library/user.rst
f1
2:mod:`user` --- User-specific configuration hook
3================================================
4
5.. module:: user
6   :synopsis: A standard way to reference user-specific modules.
n7+   :deprecated:
7
n9+.. deprecated:: 2.6
10+   The :mod:`user` module has been removed in Python 3.0.
8
9.. index::
10   pair: .pythonrc.py; file
11   triple: user; configuration; file
12
13As a policy, Python doesn't run user-specified code on startup of Python
14programs.  (Only interactive sessions execute the script specified in the
15:envvar:`PYTHONSTARTUP` environment variable if it exists).
46
47   import user
48
49   verbose = bool(getattr(user, "spam_verbose", 0))
50
51(The three-argument form of :func:`getattr` is used in case the user has not
52defined ``spam_verbose`` in their :file:`.pythonrc.py` file.)
53
t54-Programs with extensive customization needs are better off reading a program-
t57+Programs with extensive customization needs are better off reading a
55-specific customization file.
58+program-specific customization file.
56
57Programs with security or privacy concerns should *not* import this module; a
58user can easily break into a program by placing arbitrary code in the
59:file:`.pythonrc.py` file.
60
61Modules for general use should *not* import this module; it may interfere with
62the operation of the importing program.
63
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op