[Python-checkins] python/dist/src/Doc/lib libos.tex,1.156,1.157

birkenfeld@users.sourceforge.net birkenfeld at users.sourceforge.net
Sat Jun 25 20:44:51 CEST 2005


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

Modified Files:
	libos.tex 
Log Message:
Bug [ 1225705 ] os.environ documentation should mention unsetenv



Index: libos.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- libos.tex	10 Jun 2005 19:55:35 -0000	1.156
+++ libos.tex	25 Jun 2005 18:44:49 -0000	1.157
@@ -106,9 +106,15 @@
 \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
-the appropriate process-creation functions to cause child processes to
-use a modified environment.
+If \function{putenv()} is not provided, a modified copy of this mapping 
+may be passed to the appropriate process-creation functions to cause 
+child processes to use a modified environment.
+
+If the platform supports the \function{unsetenv()} function, you can 
+delete items in this mapping to unset environment variables.
+\function{unsetenv()} will be called automatically when an item is
+deleted from \code{os.environ}.
+
 \end{datadesc}
 
 \begin{funcdescni}{chdir}{path}
@@ -307,7 +313,20 @@
 Availability: recent flavors of \UNIX.
 \end{funcdesc}
 
+\begin{funcdesc}{unsetenv}{varname}
+\index{environment variables!deleting}
+Unset (delete) the environment variable named \var{varname}. Such
+changes to the environment affect subprocesses started with
+\function{os.system()}, \function{popen()} or \function{fork()} and
+\function{execv()}. Availability: most flavors of \UNIX, Windows.
 
+When \function{unsetenv()} is
+supported, deletion of items in \code{os.environ} is automatically
+translated into a corresponding call to \function{unsetenv()}; however,
+calls to \function{unsetenv()} don't update \code{os.environ}, so it is
+actually preferable to delete items of \code{os.environ}.
+\end{funcdesc}
+\end{funcdesc}
 
 \subsection{File Object Creation \label{os-newstreams}}
 



More information about the Python-checkins mailing list