jmquintana79
11/5/2015 - 3:22 PM

Get full path of current folder

Get full path of current folder

import os


# For getting the current directory of your script:
os.path.dirname(os.path.abspath(__file__))

#For getting the current working directory:
os.getcwd()

# Build a path
os.path.join("folder1","folder2","file")

# Split path in folder and filename
folder, filename = os.path.split(path)