Skip to content

Instantly share code, notes, and snippets.

@belsander
Created December 11, 2016 15:55
Show Gist options
  • Save belsander/67d1e51972244064b6bff8af96c922f9 to your computer and use it in GitHub Desktop.
Save belsander/67d1e51972244064b6bff8af96c922f9 to your computer and use it in GitHub Desktop.
__file__
# Example
$ cat test_script.py
#!/usr/bin/python
print(__file__)
$ python test_script.py
test_script.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment