Ask Your Question

Revision history [back]

If using a local path, it has to be relative to the present working directory which you can obtain by typing !pwd in the sage command line.

sage: !pwd
/home/slabbe

Otherwise, I cannot confirm since I do not have access to a Windows machine, but I would suggest to use double backlashes or use raw strings with the small r in front:

sage: load("C:\\Users\\annegret\\Documents\\beispiel.sage")

or

sage: load(r"C:\Users\annegret\Documents\beispiel.sage")

because '\n', '\b', '\U' , '\t' are meant to be characters with special meanings like new lines, tabulations, etc. See this page on Litterals from Python doc for details.

If using a local path, it has to be relative to the present working directory which you can obtain by typing !pwd in the sage command line.

sage: !pwd
/home/slabbe

Otherwise, I cannot confirm since I do not have access to a Windows machine, but I would suggest to use double backlashes or use raw strings with the small r in front:

sage: load("C:\\Users\\annegret\\Documents\\beispiel.sage")

or

sage: load(r"C:\Users\annegret\Documents\beispiel.sage")

because '\n', '\b', '\U' , '\t' are meant to be characters with special meanings like new lines, tabulations, etc. See this page on Litterals from Python doc for details.

If using a local path, it has to be relative to the present working directory which you can obtain by typing !pwdpwd in the sage command line.

sage: !pwd
pwd

Otherwise, I cannot confirm since I do not have access to a Windows machine, but I would suggest to use double backlashes or use raw strings with the small r in front:

sage: load("C:\\Users\\annegret\\Documents\\beispiel.sage")

or

sage: load(r"C:\Users\annegret\Documents\beispiel.sage")

because '\n', '\b', '\U' , '\t' are meant to be characters with special meanings like new lines, tabulations, etc. See this page on Litterals from Python doc for details.

If using a local path, it has to be relative to the present working directory which you can obtain by typing pwd in the sage command line.

sage: pwd

Otherwise, I cannot confirm since I do not have access to a Windows machine, but I would suggest to try to use double backlashes or use raw strings with the small r in front:

sage: load("C:\\Users\\annegret\\Documents\\beispiel.sage")

or

sage: load(r"C:\Users\annegret\Documents\beispiel.sage")

because '\n', '\b', '\U' , '\t' are meant to be characters with special meanings like new lines, tabulations, etc. See this page on Litterals from Python doc for details.