Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
837a9769
Commit
837a9769
authored
Jun 25, 2005
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug [ 1225705 ] os.environ documentation should mention unsetenv
parent
9020a21b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
+22
-3
Doc/lib/libos.tex
Doc/lib/libos.tex
+22
-3
No files found.
Doc/lib/libos.tex
View file @
837a9769
...
...
@@ -106,9 +106,15 @@ the mapping is modified.
\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 @@ or even
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
}}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment