代码
import os
import saythanks
is_test_run = 'TEST' in os.environ
if __name__ == '__main__' and not is_test_run:
saythanks.app.run()
入口文件;
可以指定web访问的IP和端口;
saythanks.app.run('0.0.0.0', 80)
访问,可以看到两个按钮"CREATE YOUR THANKFULNESS INBOX"和"ACCESS YOUR THANKFULNESS INBOX"
点击并没啥用;
代码缺少必要的注释,修改
'''
@File : t.py
@Time : 2019/10/10
@Author : chenzl
@Version : 1.0
@Contact : zhiliang-chen@hotmail.com
@License : CC
@Desc : 项目地址:https://github.com/BlitzKraft/saythanks.io; 由chenzl修改
'''
import os
import saythanks
is_test_run = 'TEST' in os.environ
if __name__ == '__main__' and not is_test_run:
saythanks.app.run()
如果在指定的序列中找到值返回 True,否则返回 False
相反操作为not in