Created
August 13, 2019 14:10
-
-
Save emptymalei/bf33d053eae3b23a1cca68bcc435b6ee to your computer and use it in GitHub Desktop.
weird python
This file contains hidden or 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
| python | |
| import os | |
| __cwd__ = os.getcwd() | |
| __location__ = os.path.realpath( | |
| os.path.join(__cwd__, os.path.dirname(__file__)) | |
| ) | |
| print(f'location: {__location__}') | |
| print(f'filename: {__file__}') | |
| with open(os.path.join(__location__, __file__),'r') as fp: | |
| content = fp.read() | |
| print(content) | |
| exec(content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment