berkeley-cocosci / Wallace

See https://github.com/Dallinger/Dallinger/ for the latest.
MIT License
36 stars 5 forks source link

Figure out environment variable thing w/ psiTurk #55

Closed suchow closed 9 years ago

suchow commented 9 years ago

When running psiTurk on Heroku, you can't write to the local file system and so the psiTurk and AWS keys need to be stored in environment variables. However, when running it locally, it would be nice if we could just pull the psiTurk and AWS keys from .psiturkconfig instead of making the user export them to environment variables. I can't figure out how to export them automatically because they end up getting exported to the subshell that's created, not the terminal shell.

suchow commented 9 years ago

Done. In Pythonl, if you use os.getenv instead of os.environ, you can specify a default value if no environment variable is present. So I have the default value be the config file.