#16688: replace pexpect interface calls with library where possible
--------------------------------------------+-----------------------------
       Reporter:  rws                       |        Owner:
           Type:  enhancement               |       Status:  new
       Priority:  major                     |    Milestone:  sage-wishlist
      Component:  interfaces                |   Resolution:
       Keywords:  expect, pexpect, library  |    Merged in:
        Authors:                            |    Reviewers:
Report Upstream:  N/A                       |  Work issues:
         Branch:                            |       Commit:
   Dependencies:                            |     Stopgaps:
--------------------------------------------+-----------------------------

Comment (by was):

 Replying to [comment:5 nbruin]:
 > Replying to [comment:1 fbissey]:
 > > The notebook also uses pexpect. I am not sure there is much of an
 alternative there but at least we should try to move it to a more modern
 pexpect. Trying to do so results in breakages that I have no idea how to
 solve currently.
 >
 > There is, especially when you're programming both sides. You can have
 two processes communicate through a pipe or stream without one of the
 parties pretending to be a terminal.

 I completely agree.    IPython and also
 https://github.com/sagemath/cloud/blob/master/sage_server.py are both
 examples of better ways of communication between two processes without
 using pexpect.  Basically, you setup a traditional client/server and a
 messaging protocol.  Python and many other languages makes that sort of
 thing pretty easy.  But... it would be harder to implement something like
 that in a special purpose system like Pari or Magma.  It might be
 impossible with Magma without source code access (not sure what the status
 of networking is now).


 > That said, the fact that the notebook *does* use pexpect makes it easier
 to use it to interface with R, octave, magma, etc, so we do get some
 benefit from it.

 As the author of exactly the part of the notebook that uses pexpect, etc.,
 I don't agree with this statement so much -- instead, the two are somewhat
 orthogonal.   The connection (1) "notebook_server <--> python processes"
 is done using pexpect in sagenb.  The interfaces to R/octave/magma, etc.
 are connections (2) "python processes <--> R/octave/magma/etc.".   You can
 certainly swap out (1) for a connection built using TCP (rather than
 pexpect) with no impact on (2); in fact, that's precisely what I did with
 SageMathCloud.

 That said, maybe you just meant that work on the abstract base class
 Expect for the interfaces benefits both sagenb and the R/octave/magma,
 etc., interfaces...

--
Ticket URL: <http://trac.sagemath.org/ticket/16688#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to