Changes between Version 14 and Version 16 of Ticket #23112


Ignore:
Timestamp:
Jun 12, 2017, 12:38:12 AM (6 years ago)
Author:
mkoeppe
Comment:

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:

04f69a2Mathematica.__init__: Implement two modes that work without helper script math-readline

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23112

    • Property Status changed from needs_work to needs_review
    • Property Cc yzh added
    • Property Branch changed from u/jdemeyer/math_readline_script_is_broken to u/mkoeppe/math_readline_script_is_broken
    • Property Commit changed from cfa1c551ae754f59a48886f9b390fcc095d8e83b to 04f69a2243fb37ebb23e46673484ecb29bb71249
  • Ticket #23112 – Description

    v14 v16  
    1 The script `src/bin/math-readline` (from #16703) puts the terminal in a bad state (due to #20173). There is also this problem reported by John Palmieri:
     1The script `src/bin/math-readline` (from #16703), which is used by the `Mathematica` pexpect interface and by `mathematica_console`, puts the terminal in a bad state (due to #20173). There is also this problem reported by John Palmieri:
    22
    33If I run