add doc for environ.environ

This commit is contained in:
Prodesire 2018-01-15 00:16:33 +08:00
parent 9249a09196
commit e9cfa5101c
2 changed files with 18 additions and 0 deletions

17
docs/environ.rst Normal file
View File

@ -0,0 +1,17 @@
Environ
-------
.. py:function:: pydu.environ.environ(**kwargs)
Context manager for updating one or more environment variables.
Preserves the previous environment variable (if available) and
recovers when exiting the context manager.
>>> from pydu.environ import environ
>>> with environ(a='a'):
... print(os.environ['a'])
...
a

View File

@ -26,6 +26,7 @@ Content
console
convert
dict
environ
exception
inspect
list