#9636: Catch output from PARI in Sage
------------------------------+---------------------------------------------
   Reporter:  jdemeyer        |       Owner:  was     
       Type:  defect          |      Status:  new     
   Priority:  major           |   Milestone:  sage-4.6
  Component:  interfaces      |    Keywords:          
     Author:  Jeroen Demeyer  |    Upstream:  N/A     
   Reviewer:                  |      Merged:          
Work_issues:                  |  
------------------------------+---------------------------------------------
Description changed by jdemeyer:

Old description:

> The output from print() functions in libpari is directly written to
> stdout and is not caught by Sage.  For example, the following doctest
> fails:
> {{{
> def printhello():
>     """
>     sage: printhello()
>     hello
>     """
>     pari('print("hello")')
> }}}
> It gives
> {{{
> File "/home/jdemeyer/paritest.sage", line 3:
>     sage: printhello()
> Expected:
>     hello
> Got nothing
> }}}
>
> Luckily, libpari provides ways to redirect the output.  There should a
> small Cython wrapper to direct the PARI output to sys.stdout.write().
>
> I will try to implement this (using #9343 as starting point). -- Jeroen
> Demeyer

New description:

 The output from print() functions in libpari is directly written to stdout
 and is not caught by Sage.  For example, the following doctest fails:
 {{{
 def printhello():
     """
     sage: printhello()
     hello
     """
     pari('print("hello")')
 }}}
 It gives
 {{{
 File "/home/jdemeyer/paritest.sage", line 3:
     sage: printhello()
 Expected:
     hello
 Got nothing
 }}}

 Luckily, libpari provides ways to redirect the output.  There should a
 small Cython wrapper to direct the PARI output to sys.stdout.write().

 Dependencies: #9661, #9343

--

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