#19607: Return properly formatted GAP output when using a temporary file
-------------------------------------+-------------------------------------
       Reporter:  jaanos             |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.10
      Component:  interfaces         |   Resolution:
       Keywords:  GAP interface      |    Merged in:
  temporary file                     |    Reviewers:
        Authors:  Janoš Vidali       |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  07a3d6c4dd1676146f08766d77f3c95691ac81a4
  u/jaanos/return_properly_formatted_gap_output_when_using_a_temporary_file|    
 Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------
Changes (by {'newvalue': u'Jano\u0161 Vidali', 'oldvalue': ''}):

 * status:  new => needs_review
 * author:   => Janoš Vidali
 * cc: tscrim (added)
 * component:  PLEASE CHANGE => interfaces
 * keywords:   => GAP interface temporary file
 * type:  PLEASE CHANGE => defect


Old description:



New description:

 As observed in #19585, evaluating GAP commands using a temporary file can
 cause problems as the output is handled differently - for example, strings
 printed from the console are wrapped in `""`, but not when they are
 `Print`ed, as would happen when fetched using a file.

 This patch aims to fix the difference by assigning the results of a
 command to an auxiliary value when applicable, and then print the contents
 of the variable from the console. This replaces the call to `Print`, which
 gave possibly malformed results. It still causes an error when calling a
 function that does not return a variable, but since the side effects still
 apply, the behaviour doesn't change in these cases.

 However, now we attempt to detect whether `Print` or `Display` is being
 called. In this case, the command is passed on unchanged, as trying to
 assign would cause us to lose the output due to the error. Of course, this
 does in no way cover all cases when such an output may be lost.

 The branch includes commits from #19585, since it builds upon the changes
 made there.

--

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