Last active
August 18, 2016 05:43
-
-
Save jmquintana79/44ed5cfd8bb0766f6a4c to your computer and use it in GitHub Desktop.
Get full path of current folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment