Last active
April 17, 2018 18:36
-
-
Save marcusmonteiro/7078b87cb2408d33056876dbd99e32a1 to your computer and use it in GitHub Desktop.
Get a file path using the directory where the script is executing as reference.
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 | |
here = os.path.dirname(os.path.abspath(__file__)) | |
def local_file(file): | |
return os.path.join(here, file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment