Hello, team:
(I am the same person who contributed the symbolic-logic tests from Gries & Schneider)
My use case is to run a mathics session inside another Python program. I want to do something like this:
import matics.session as ms
msession = ms.Session()
msession.evaluate_for_side_effect('x = {42, 43, 44}') # <~~~ mathics code in string! return None or raise exception; anything reasonable
msession.evalutae_for_result('x') # <~~~ want this to return string '{42, 43, 44}'
messsion.evaluate_for_output('Print[x[[1]]];') # <~~~ want this to return string '42'
I'm more than happy to reuse the existing parser-feeder infrastructure as illustrated in mathics.main, mathics.benchmark, mathics.test, etc., but I've encountered a few roadblocks like no $Line for the parser.
I'd be grateful for any guidance. Perhaps you have this already and I just haven't seen it. Perhaps there is an easy-ish way to adapt one of the existing "main" routines?