获取文件的绝对路径 import ospath = os.path.join(os.path.dirname(__file__), 'bbc_test.yaml').replace('\','/')print path