vendredi 11 septembre 2015

Accessing environment variables in python

Why does this not print out 'xxx'?

$ SECRET_KEY='xxx' python -c 'import os; print os.environ['SECRET_KEY']'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'SECRET_KEY' is not defined



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire