python打开一个本地目录文件路径
时间:2016-03-24 12:55:11
收藏:0
阅读:219
os.path.abspath()
os 模块为 python 语言标准库中的 os 模块包含普遍的操作系统功能。主要用于操作本地目录文件。path.abspath()方法用于获取当前路径下的文件。
比如:
file_path = ‘file:///‘ + os.path.abspath(‘checkbox.html‘)
driver.get(file_path)
原文:http://www.cnblogs.com/pachongshangdexuebi/p/5314834.html
评论(0)