分类:
python
self.url = os.path.abspath('.').replace("\\","/") + r'/youer_file_path/filename.html'
这样写 linux 是读不到文件 按道理说 路径转成 / 是可以的 但是就是读取不到
解决方案:
self.url = "file://" + os.path.join(os.getcwd(), "you_file_path/filename.html")
评价