mirror of https://github.com/flaggo/pydu.git
add doc for environ.path
This commit is contained in:
parent
6b16e21305
commit
05c5f4e748
|
@ -15,3 +15,16 @@ Environ
|
|||
...
|
||||
a
|
||||
|
||||
|
||||
.. py:function:: pydu.environ.path(append=None, prepend=None, replace=None)
|
||||
|
||||
Context manager for updating the PATH environment variable which
|
||||
appends, prepends or replaces the PATH with given string or
|
||||
a list of strings.
|
||||
|
||||
>>> import os
|
||||
>>> from pydu.environ import path
|
||||
>>> with path(append='/foo'):
|
||||
... print(os.environ['PATH'])
|
||||
...
|
||||
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/foo
|
||||
|
|
Loading…
Reference in New Issue