I have scripts calling other script files but I need to get the filepath of the file that is currently running within the process.
For example, let\'s say I have th
__file__
as others have said. You may also want to use os.path.realpath to eliminate symlinks:
import os os.path.realpath(__file__)