Last active
August 29, 2015 14:11
-
-
Save crmackay/0b8754a1e35bc2df2649 to your computer and use it in GitHub Desktop.
finding path of running file
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 | |
#path to direcory containing file | |
path = os.path.dirname(os.path.abspath(__file__)) | |
# path to containing directory | |
path_above = os.path.split(path)[0] | |
# path to parellel directory | |
new_path = os.path.join((path_above, 'new_folder')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment