Thursday, April 4, 2019

Python using relative paths in files

Use below syntax to run python script from anywhere

import sys
import os.path
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__),"../Config/")))

No comments:

Post a Comment