MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/zlmeoj/python_magic_methods_you_havent_heard_about/j08b1cm/?context=3
r/Python • u/Am4t3uR • Dec 14 '22
13 comments sorted by
View all comments
8
Please don't encourage the usage of __file__. This is something I've been fighting for the past week 🙈
__file__
https://github.com/indygreg/PyOxidizer/issues/69
4 u/[deleted] Dec 14 '22 https://docs.python.org/3.8/library/importlib.html?highlight=importlib#module-importlib.resourcesUse this. Source: I spent the past week also fighting this shit. Also PLEASE STOP USING UNCOMPRESSED DATAFILES IN YOUR LIBRARIES. Just zip them for ur pypi builds please.Stares violently at boto.
4
https://docs.python.org/3.8/library/importlib.html?highlight=importlib#module-importlib.resources
Use this. Source: I spent the past week also fighting this shit. Also PLEASE STOP USING UNCOMPRESSED DATAFILES IN YOUR LIBRARIES. Just zip them for ur pypi builds please.
Stares violently at boto.
8
u/wpg4665 Dec 14 '22
Please don't encourage the usage of
__file__. This is something I've been fighting for the past week 🙈https://github.com/indygreg/PyOxidizer/issues/69