Replying to jdemeyer:
Replying to mkoeppe:
The math-readline script seems to trick Mathematica into interactive mode.
The strange thing is that pexpect
is really supposed to be exactly like an interactive session. As far as the application is concerned, there should be no difference between a pexpect
session or, say, an xterm
or SSH session.
I have investigated further and have implemented two solutions, which can be selected by use_pipe=False
or True
. In either mode, the math-readline
script is no longer used by the Mathematica
pexpect interface (except for mathematica_console
). See comments in mathematica.py
for more info.
Eliminating the use of a helper script also makes it more convenient to work with a remote Mathematica server and is also slightly faster. I have tested with Mathematica 11 on Mac OS X, both locally and with server=localhost
.
This could use some testing on different platforms and with different Mathematica versions.
New commits:
04f69a2 | Mathematica.__init__: Implement two modes that work without helper script math-readline
|