get documents folder path python for both mac and windows code example
Example: python how to open a file in a different directory in mac
import os
f = open (os.path.expanduser("~/Desktop/somedir/somefile.txt"))
import os
f = open (os.path.expanduser("~/Desktop/somedir/somefile.txt"))