Skip to main content

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, default os.environ.
  • default: value to substitute for unknown vars; if default is None a ValueError is 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, default os.environ.
  • dosub: if true, use envsub() to perform environment variable substitution on default if it used. Default value is False.

Release files for cs.env 20190103

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cs.env 20190103
File Size Uploaded
cs.env-20190103.tar.gz 2.3 kB Details

Release files / cs.env-20190103.tar.gz

Download URL cs.env-20190103.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
75f6c7e2b10335183edd2a8b28b0f6ef9763eba6b8d5a3819f452072b71c9553
BLAKE2b-256 checksum
How to use checksums
ec6f1cebbbf7753a6414024b040fd4d6a1db623ce160361ed694cd0a8d979545
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

20190103 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page