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.2.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for envsubst-0.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d32bb0b978cb2b4c77c40421335f8a5cdfb6a81ae645930140e4ce40e95e989b |
|
MD5 | f99265e72598fa8291c1ef16a9eb9d3f |
|
BLAKE2b-256 | 29706977b7f2a604779bca765e4d6185bcde0139a8e33523cbb3022db43e6685 |