Last active
December 19, 2015 10:39
-
-
Save rickcnagy/5942187 to your computer and use it in GitHub Desktop.
chdir to script's actual path in Python 2.7 - necessary when firing scripts from cron
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
#cd to the script's directory in case it is not the current working directory | |
os.chdir(os.path.dirname(os.path.abspath(__file__))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment