Substitue environment variables in a string
Project description
Substitue environment variables in a string:
>>> import os >>> from envsubst import envsubst >>> del os.environ['PS1'] >>> print(envsubst('$USER@$HOST ${PS1:-$}:')) ashafer01@github.com $: >>> os.environ['PS1'] = '' >>> print(envsubst('$USER@$HOST ${PS1:-$}:')) ashafer01@github.com $: >>> print(envsubst('$USER@$HOST ${PS1-foo}:')) ashafer01@github.com :
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
envsubst-0.1.0.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for envsubst-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d19565dd159a55120c785e40814d2d4d7e7de67130593adc201748bb7982a6b8 |
|
MD5 | 07cc4059d37864764cc8348edab476ca |
|
BLAKE2b-256 | 240669a9f15f8e5b66e9009e2e9a590ee996ee8011c4976bbe7043c324a75d2a |