how to get the correct path of a file in mac just by giving the filename in python code example
Example 1: python how to open a file in a different directory in mac
import os
f = open (os.path.expanduser("~/Desktop/somedir/somefile.txt"))
Example 2: get pyhton file path python
import os
os.path.realpath(__file__)