I have a set a variable called ‘DATA_PATH’ in the Path Variables menu of Pycharm. The value is similar to /Users/myname/folder1/subfolder2
Within subfolder2 directory there is a file called ‘copy5.sgm’ and I want to use the path variable I just created to locate this file.
As an example, I have tried
with open("$DATA_PATH$/copy5.sgm", 'r') as f:
contents = f.read()
print(contents)
But I receive the error No such file or directory: “$DATA_PATH$/copy5.sgm”
3