[Python-checkins] python/dist/src/Doc/lib libos.tex,1.139,1.140

tim_one at users.sourceforge.net tim_one at users.sourceforge.net
Mon Jul 26 02:42:44 CEST 2004


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29015/Doc/lib

Modified Files:
	libos.tex 
Log Message:
SF bugs 996748:  os.environ documentation should indicate unreliability

Clarifed that os.environ is captured once; emphasized that it's better
to assign to os.environ than to call putenv() directly (the putenv()
docs said so, but the environ docs didn't).


Index: libos.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v
retrieving revision 1.139
retrieving revision 1.140
diff -C2 -d -r1.139 -r1.140
*** libos.tex	19 Jul 2004 01:39:54 -0000	1.139
--- libos.tex	26 Jul 2004 00:42:41 -0000	1.140
***************
*** 91,100 ****
  platforms), and is equivalent to \code{getenv("HOME")} in C.
  
  If the platform supports the \function{putenv()} function, this
  mapping may be used to modify the environment as well as query the
  environment.  \function{putenv()} will be called automatically when
! the mapping is modified.  \note{On some platforms, including
! FreeBSD and Mac OS X, setting \code{environ} may cause memory leaks.
! Refer to the system documentation for putenv.}
  
  If \function{putenv()} is not provided, this mapping may be passed to
--- 91,109 ----
  platforms), and is equivalent to \code{getenv("HOME")} in C.
  
+ This mapping is captured the first time the \module{os} module is
+ imported, typically during Python startup as part of processing
+ \file{site.py}.  Changes to the environment made after this time are
+ not reflected in \code{os.environ}, except for changes made by modifying
+ \code{os.environ} directly.
+ 
  If the platform supports the \function{putenv()} function, this
  mapping may be used to modify the environment as well as query the
  environment.  \function{putenv()} will be called automatically when
! the mapping is modified.
! \note{Calling \function{putenv()} directly does not change
! \code{os.environ}, so it's better to modify \code{os.environ}.}
! \note{On some platforms, including FreeBSD and Mac OS X, setting
! \code{environ} may cause memory leaks.  Refer to the system documentation
! for \cfunction{putenv()}.}
  
  If \function{putenv()} is not provided, this mapping may be passed to



More information about the Python-checkins mailing list