Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
weird python
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
You can’t perform that action at this time.