Some environment related functions.
-
LOGDIR, VARRUN, FLAGDIR: lambdas defining standard places used in other modules
-
envsub: replace substrings of the form '$var' with the value of 'var' from
environ. -
getenv: fetch environment value, optionally performing substitution
Function envsub(s, environ=None, default=None)
Replace substrings of the form '$var' with the value of 'var' from environ.
Parameters:
environ: environment mapping, defaultos.environ.default: value to substitute for unknown vars; ifdefaultisNoneaValueErroris raised.
Function getenv(var, default=None, environ=None, dosub=False)
Fetch environment value.
Parameters:
var: name of variable to fetch.default: default value if not present. If not specified or None, raise KeyError.environ: environment mapping, defaultos.environ.dosub: if true, use envsub() to perform environment variable substitution ondefaultif it used. Default value isFalse.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cs.env-20190103.tar.gz
(2.3 kB
view details)
File details
Details for the file cs.env-20190103.tar.gz.
File metadata
- Download URL: cs.env-20190103.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75f6c7e2b10335183edd2a8b28b0f6ef9763eba6b8d5a3819f452072b71c9553
|
|
| MD5 |
b1c0f4d2f341d13a62150957288faf04
|
|
| BLAKE2b-256 |
ec6f1cebbbf7753a6414024b040fd4d6a1db623ce160361ed694cd0a8d979545
|