I'm trying to access a .txt file in my root account to open and read in python. My code looks like this:
>>> path = 'root/unpackedFiles/enrollment_fact.txt'
>>> read = open(path,'r')
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
read = open(path,'r')
FileNotFoundError: [Errno 2] No such file or directory: 'root/unpackedFiles/enrollment_fact.txt'
I've also tried several variations of this with no such luck. Including:
path = 'unpackedFiles/enrollment_fact.txt' and path = 'enrollment_fact.txt'
/root/unpackedFiles/enrollment_fact.txt, you can test that by doingls /root/unpackedFiles/enrollment_fact.txton your terminal