this_file

(function from pyomo.common.fileutils)

pyomo.common.fileutils.this_file(stack_offset=1)[source]

Returns the file name for the module that calls this function.

This function is more reliable than __file__ on platforms like Windows and in situations where the program has called os.chdir().