Substitute environment variables in a string
Project description
Substitute 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.3.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for envsubst-0.1.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8a3334bb4cb499249334c57ff45219789a4f5a3fcf38c88edef5a17acd759a5 |
|
MD5 | d7c1d3a4e37bf68a9c9dd47e996138ba |
|
BLAKE2b-256 | 9a0cbb1690f29ef153b4604dd85f6996c3a62ca4281ba1d31478313d8f6f94bd |