python how find name of current file code example Example: get self file name in python import os os.path.basename(__file__)