python get name of file that is currently running code example Example: get self file name in python import os os.path.basename(__file__)