os - Get the path of all files in a directory - Python code ...

文章推薦指數: 80 %
投票人數:10人

Get the absolute path of a file ... file2 file3 file1. import os. d = "dir" for path in os.​listdir(d): full_path = os.path.join(d, path) if os.path.isfile(full_path): print full_path​ ...



請為這篇文章評分?