Answers for "how to get the location of a any file using python"

12

python get current file location

import os
os.path.dirname(os.path.abspath(__file__))
Posted by: Guest on May-11-2020
0

python get files in directory

(_, _, filenames) = os.walk(mypath).next() #if you are confident that the walk will return at least one value
Posted by: Guest on August-31-2021

Code answers related to "how to get the location of a any file using python"

Python Answers by Framework

Browse Popular Code Answers by Language