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
The __file__ attribute works for both the file containing the main execution code as well as imported modules.
__file__
See https://web.archive.org/web/20090918095828/http://pyref.infogami.com/__file__