Last active
August 16, 2017 00:15
-
-
Save jtr109/cef3e8ed8e89062cccd7aaf31f3eb591 to your computer and use it in GitHub Desktop.
从环境变量中获取 WXAPP_TEST_SITEUSER
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
WXAPP_TEST_SITEUSER = os.getenv('WXAPP_TEST_SITEUSER') # return None if not exist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 环境变量可以在 shell 中手动赋值, 手动写入是一次性的. | |
# 也可以写进 ~/.bashrc 或 ~/.zshrc (根据具体情况确定) 中, 保证每次系统加载的时候都会调用赋值. | |
export WXAPP_TEST_SITEUSER = testuser |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment