当我使用os.path.abspath()获取文件绝对路径的时候,为什么总是得到像"workspace"+"filename"这样的路径?importosdir="E:/Videos"forfinos.listdir(dir):print(os.path.abspath(f))输出是:Python3.5.2(v3.5.2:4def2a2901a5,Jun252016,22:01:18)[MSCv.190032bit(Intel)]onwin32Type"copyright","credits"or"license()"formoreinformation.>>>====================RESTART:E:/Workspace/Python/Test.py====================E:\Workspace\Python\13.gifE:\Workspace\Python\b0020dgz88t.p401.1.mp4E:\Workspace\Python\c0021dj07u4.p401.1.mp4E:\Workspace\Python\n0021jtr5c6.p401.1.mp4E:\Workspace\Python\o0019ba3fy0.p401.1.mp4E:\Workspace\Python\x0021k863rf.p401.1.mp4E:\Workspace\Python\z0015vpyqkv.p402.1.mp4>>>
添加回答
举报
0/150
提交
取消