Mathics3 / mathics-core

An open-source Mathematica. This repository contains the Python modules for WL Built-in functions, variables, core primitives, e.g. Symbol, a parser to create Expressions, and an evaluator to execute them.
https://mathics.org
Other
782 stars 48 forks source link

Get trace/debug tweaks and fixes... #1098

Closed rocky closed 2 months ago

rocky commented 2 months ago

Get[xx, Trace->True] was not showing all lines read. And we did not properly hook into a changeable print function.

Using: import a.b.c as e

reduces unchangeable lookup (a.b.c) does not change and simplifies and use -- e.GET_PRINT_FN as opposed to a.b.c.GET_PRINT_FN

rocky commented 2 months ago

See also the branch with the same name in mathics-debugger which changes along with this.

With both changes, we can debug step through Get requests and try stuff out as the code gets loaded.

Some of the user interface feels clunky, but over time and with use, it will be clearer how to improve things where needed.