Answers for "how to get the correct path of a file in mac just by giving the filename in python"

-3

get pyhton file path python

import os

os.path.realpath(__file__)
Posted by: Guest on October-13-2020
1

python how to open a file in a different directory in mac

import os
f = open (os.path.expanduser("~/Desktop/somedir/somefile.txt"))
Posted by: Guest on August-16-2020

Code answers related to "how to get the correct path of a file in mac just by giving the filename in python"

Python Answers by Framework

Browse Popular Code Answers by Language