env cr cr cit python -c import os print os getenv OPENSHIFT_POSTGRESQL

1
2
3
4
5
6
7
(env)cr@cr ~/p/cit> python -c "import os; print os.getenv('OPENSHIFT_POSTGRESQL_DB_HOST')" master
None
(env)cr@cr ~/p/cit> python -c "import os; print os.getenv('OPENSHIFT_POSTGRESQL_DB_HOST', 'defaultname')" master
defaultname
(env)cr@cr ~/p/cit> export OPENSHIFT_POSTGRESQL_DB_HOST=mydbname master
(env)cr@cr ~/p/cit> python -c "import os; print os.getenv('OPENSHIFT_POSTGRESQL_DB_HOST', 'defaultname')" master
mydbname