#10295: Upgrading pexpect
---------------------------+------------------------------------------------
   Reporter:  SimonKing    |       Owner:  was            
       Type:  enhancement  |      Status:  new            
   Priority:  major        |   Milestone:  sage-4.7       
  Component:  interfaces   |    Keywords:  pexpect upgrade
     Author:               |    Upstream:  N/A            
   Reviewer:               |      Merged:                 
Work_issues:               |  
---------------------------+------------------------------------------------

Comment(by drkirkby):

 2.4 is not released yet. Here's a package for 2.3 that I created.

 http://boxen.math.washington.edu/home/kirkby/patches/pexpect-2.3.spkg

 but on my !OpenSolaris machine, this 2.3 package results in one doctest
 failure, which is:

 {{{
 sage -t  -long -force_lib devel/sage/sage/interfaces/expect.py
 }}}

 The interface must be semi-working, as the interface to R works - or at
 lease the R doctest does not fail. Here's the error message of the failed
 doctest.

 {{{
 sage -t  -long -force_lib devel/sage/sage/interfaces/sage0.py
          [14.8 s]
 sage -t  -long -force_lib devel/sage/sage/interfaces/expect.py
 Exception pexpect.ExceptionPexpect: ExceptionPexpect() in <bound method
 spawn.__del__ of <pexpect.spawn object at 0xc5988ac>> ignored

 <snip out load more similar errors>

 <pexpect.spawn object at 0xc386d6c>> ignored
 Exception pexpect.ExceptionPexpect: ExceptionPexpect() in <bound method
 spawn.__del__ of <pexpect.spawn object at 0xc386d6c>> ignored
 **********************************************************************
 File "/export/home/drkirkby/sage-4.7.alpha3/devel/sage-
 main/sage/interfaces/expect.py", line 867:
     sage: r._expect.before
 Expected:
     'abc;\r\n[1] '
 Got:
     'abc <- 10 +15;\r\n__SAGE__R__PROMPT__> abc;\r\n[1] '
 **********************************************************************
 1 items had failures:
    1 of  11 in __main__.example_16
 ***Test Failed*** 1 failures.
 For whitespace errors, see the file
 /export/home/drkirkby/.sage//tmp/.doctest_expect.py
          [18.4 s]
 sage -t  -long -force_lib devel/sage/sage/interfaces/gap.py
          [20.4 s]
 }}}

 I think in some cases where we call external programs there are probably
 better ways of doing this. For example
  * R has libraries, I expect we can call R via the libraries, rather than
 on the command line.
  * Mathematica uses the
 
[http://reference.wolfram.com/mathematica/tutorial/MathLinkAndExternalProgramCommunicationOverview.html
 Mathlink] protocol to communicate between the kernel and front end. How to
 use
 
[http://reference.wolfram.com/mathematica/tutorial/MathLinkAndExternalProgramCommunicationOverview.html
 Mathlink] is documented, and has been used by at least open-source program
 ([http://robotics.caltech.edu/~radford/jmath/ JMath]) to work with
 Mathematica. But Sage calls Mathematica via the command line.

 Dave

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10295#comment:5>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to