Python CLI script resources

(, en)

Get path of curently executing file

from inspect import getsourcefile
from os.path import abspath

file_path = abspath(getsourcefile(lambda:0))

How do I get the path of the current executed file in Python? - Stack Overflow