Line Numbers Errors from command line refer to python code

28 views
Skip to first unread message

Chris Greene

unread,
Oct 7, 2019, 7:04:10 PM10/7/19
to sage-devel
Hello,

Consider the following script:

```
$ cat test.sage
//
$ sage test.sage
  File "test.sage.py", line 6
    //
     ^
SyntaxError: invalid syntax
```

The error message is for the derived python file, rather than the the sage script. Loading scripts from within the interpreter using sage's builtin `load` function gives the expected line number. Assuming that this is incorrect behavior, is fixing this as simple as installing whaterver hooks that the `load` function uses on errors?

Chris
Reply all
Reply to author
Forward
0 new messages