Hello,
The following code will work on my Linux computer if I use the "/usual path/" in Linux but I cannot get Sage to recognize my Windows path. My code
with open('C:\Users\miram\OneDrive\Documents\Programming\Original.txt", 'r') as f:
L = f.readlines()
I have also tried the path
with open('C:\\Users\\miram\\OneDrive\\Documents\\Programming\\Original.txt", 'r') as f:
L = f.readlines()
I have also tried the path
with open('C:\\Text\\22.PE.Orig.List.txt", 'r') as f:
L = f.readlines()
and with one backslash.
I get the following error:
IOError: [Errno 2] No such file or directory: 'C:\\Text\\22.PE.Orig.List.txt'
What I want to do, as can be seen, is import a text file into SageMath so that I can work with the list created.
I am following: https://ask.sagemath.org/question/28765/turning-a-txt-file-into-a-list-in-sagemathpython/ and have followed the advice for my Linux machine and have not had a problem. I need to do it on my Windows computer, though.