get path to file without filename python
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
You must login to ask question.
Use
os.path.dirname(filename)
import json, os
print(os.getcwd())
print(os.path.dirname(__file__))