我正在开发一个django应用程序,将运行在raspberry pi 3的生产。
我必须知道在应用程序的开头,它是在raspberry上运行,还是在dev环境中运行。在dev中,我使用假传感器数据而不是引脚。
直到现在,我使用了这个方法:
from sys import platform as _platform
test_environment = "win" in _platform or "darwin" in _platform
这对我的pc和mac来说都很不错,但现在我想把它部署到一个ubuntu网络服务器上。Raspbian也是linux,所以我需要