direct path python file recalling code example
Example 1: python open file relative to module
import os
TEST_FILENAME = os.path.join(os.path.dirname(__file__), 'test.txt')
Example 2: python file location path
import os
print('getcwd: ', os.getcwd())
print('__file__: ', __file__)