Logo

Programming-Idioms

History of Idiom 205 > diff from v12 to v13

Edit summary for version 13 by richiverse:
New Python implementation by user [richiverse]

Version 12

2019-09-30, 12:00:44

Version 13

2019-09-30, 15:46:59

Idiom #205 Get an environment variable

Read an environment variable with the name "FOO" and assign it to the string variable foo. If it does not exist or if the system does not support environment variables, assign a value of "none".

Idiom #205 Get an environment variable

Read an environment variable with the name "FOO" and assign it to the string variable foo. If it does not exist or if the system does not support environment variables, assign a value of "none".

Extra Keywords
envvar os system
Extra Keywords
envvar os system
Imports
from os import getenv
Code
_foo = getenv('FOO')