# index.html文件 <!DOCTYPE html> <html dir="ltr"> <head> <meta charset="utf-8"> <title>Allure Report</title> <link rel="favicon" href="favicon.ico?v=2"> <link rel="stylesheet" type="text/css" href="styles.css"> <link rel="stylesheet" href="plugins/screen-diff/styles.css"> </head> <body> <div id="alert"></div> <div id="content"> <span class="spinner"> <span class="spinner__circle"></span> </span> </div> <div id="popup"></div> <script src="app.js"></script> <script src="plugins/behaviors/index.js"></script> <script src="plugins/packages/index.js"></script> <script src="plugins/screen-diff/index.js"></script> </body> </html>
web.py代码,打开html文件空白,没有数据渲染加载。不用这个py启动文件是正常的
import web urls = ( '/(.*)', 'hello' ) app = web.application(urls, globals()) class hello: def GET(self, name): return open(r'index.html', 'r').read().encode('utf-8') if __name__ == "__main__": app.run()
应该是文件没有加载到吧