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.1.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for envsubst-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8fc605925b83389ad42a0f8a8f97d129c02856e7a19f485627d46deaf246dec |
|
MD5 | e5f05de042fbcf1ad51d21680f37ec57 |
|
BLAKE2b-256 | f4e16f546f7dbab7255662ea7df840389609cf79f5ecca8d8ec7962fbceaeec4 |