#6661: [with patch, positive review] Misleading warning message of  
_expect_expr()
at KeyboardInterrupt
-------------------------------+--------------------------------------------
 Reporter:  SimonKing          |        Owner:  SimonKing      
     Type:  defect             |       Status:  closed         
 Priority:  minor              |    Milestone:  sage-4.1.1     
Component:  interfaces         |   Resolution:  fixed          
 Keywords:  KeyboardInterrupt  |     Reviewer:  Minh Van Nguyen
   Author:  Simon King         |       Merged:  Sage 4.1.1.rc1 
-------------------------------+--------------------------------------------
Changes (by mvngu):

  * status:  assigned => closed
  * reviewer:  => Minh Van Nguyen
  * resolution:  => fixed
  * merged:  => Sage 4.1.1.rc1


Comment:

 Before patch:
 {{{
 ----------------------------------------------------------------------
 | Sage Version 4.1, Release Date: 2009-07-09                         |
 | Type notebook() for the GUI, and license() for information.        |
 ----------------------------------------------------------------------
 sage: print sage0.eval("alarm(1); singular._expect_expr('1')")
 Control-C pressed.  Interrupting R. Please wait a few seconds...
 ---------------------------------------------------------------------------
 KeyboardInterrupt                         Traceback (most recent call
 last)

 
/home/mvngu/.sage/temp/sage.math.washington.edu/23333/_home_mvngu__sage_init_sage_0.py
 in <module>()

 /usr/local/sage/local/lib/python2.6/site-
 packages/sage/interfaces/expect.pyc in _expect_expr(self, expr, timeout)
     830                 else:
     831                     break
 --> 832             raise KeyboardInterrupt, msg
     833
     834     def _sendstr(self, str):

 KeyboardInterrupt: computation timed out because alarm was set for 1
 seconds
 sage: print sage0.eval("alarm(1); gap._expect_expr('1')")
 Control-C pressed.  Interrupting R. Please wait a few seconds...
 ---------------------------------------------------------------------------
 KeyboardInterrupt                         Traceback (most recent call
 last)

 
/home/mvngu/.sage/temp/sage.math.washington.edu/23333/_home_mvngu__sage_init_sage_0.py
 in <module>()

 /usr/local/sage/local/lib/python2.6/site-
 packages/sage/interfaces/expect.pyc in _expect_expr(self, expr, timeout)
     830                 else:
     831                     break
 --> 832             raise KeyboardInterrupt, msg
     833
     834     def _sendstr(self, str):

 KeyboardInterrupt: computation timed out because alarm was set for 1
 seconds

 }}}
 The error message should say that it's interrupting Singular or GAP, not
 R. Now after the patch:
 {{{
 ----------------------------------------------------------------------
 | Sage Version 4.1.1.rc0, Release Date: 2009-07-29                   |
 | Type notebook() for the GUI, and license() for information.        |
 ----------------------------------------------------------------------
 **********************************************************************
 *                                                                    *
 * Warning: this is a prerelease version, and it may be unstable.     *
 *                                                                    *
 **********************************************************************
 sage: print sage0.eval("alarm(1); singular._expect_expr('1')")
 Control-C pressed.  Interrupting Singular. Please wait a few seconds...
 ---------------------------------------------------------------------------
 KeyboardInterrupt                         Traceback (most recent call
 last)

 
/home/mvngu/.sage/temp/sage.math.washington.edu/23479/_home_mvngu__sage_init_sage_0.py
 in <module>()

 /scratch/mvngu/release/sage-4.1.1.rc0/local/lib/python2.6/site-
 packages/sage/interfaces/expect.pyc in _expect_expr(self, expr, timeout)
     838                 else:
     839                     break
 --> 840             raise KeyboardInterrupt, msg
     841
     842     def _sendstr(self, str):

 KeyboardInterrupt: computation timed out because alarm was set for 1
 seconds
 sage: print sage0.eval("alarm(1); gap._expect_expr('1')")
 Control-C pressed.  Interrupting Gap. Please wait a few seconds...
 ---------------------------------------------------------------------------
 KeyboardInterrupt                         Traceback (most recent call
 last)

 
/home/mvngu/.sage/temp/sage.math.washington.edu/23479/_home_mvngu__sage_init_sage_0.py
 in <module>()

 /scratch/mvngu/release/sage-4.1.1.rc0/local/lib/python2.6/site-
 packages/sage/interfaces/expect.pyc in _expect_expr(self, expr, timeout)
     838                 else:
     839                     break
 --> 840             raise KeyboardInterrupt, msg
     841
     842     def _sendstr(self, str):

 KeyboardInterrupt: computation timed out because alarm was set for 1
 seconds
 }}}
 The error message now correctly says that it's interrupting Singular or
 GAP. So positive review.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6661#comment:3>
Sage <http://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