Skip to content

Instantly share code, notes, and snippets.

@c0ldlimit
Created April 19, 2013 15:46
Show Gist options
  • Save c0ldlimit/5421209 to your computer and use it in GitHub Desktop.
Save c0ldlimit/5421209 to your computer and use it in GitHub Desktop.
#python open a file in the same directory as a python script
# http://stackoverflow.com/questions/4060221/how-to-reliably-open-a-file-in-the-same-directory-as-a-python-script?utm_source=feedly
__location__ = os.path.realpath(
os.path.join(os.getcwd(), os.path.dirname(__file__)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment