#4986: [with patch, do not review] import audit class to sage/all.py
---------------------------+------------------------------------------------
   Reporter:  robertwb     |          Owner:  mabshoff       
       Type:  enhancement  |         Status:  needs_work     
   Priority:  major        |      Milestone:  sage-wishlist  
  Component:  performance  |       Keywords:                 
Work_issues:               |       Upstream:  N/A            
   Reviewer:               |         Author:  Robert Bradshaw
     Merged:               |   Dependencies:                 
---------------------------+------------------------------------------------

Comment(by leif):

 Replying to [comment:7 kcrisman]:
 > Ditto.

 Re: sage-devel thread: I was wondering what you were waiting for.

 (Haven't tested the patch here; I think you won't be able to print PARI's
 variables with this method anyway, at least not easily.)

 Note that you can inject code into the C files generated by Cython, e.g.
 with your favourite friend `sed`, especially into the functions called
 upon module initialization:
 {{{
 #!sh
 $ cd devel/sage/sage/rings
 $ sed -i -e '/^PyMODINIT_FUNC PyInit_.*(void)$/,+3s/^{$/{\n
 printf("Hello!\\n");\n/' real_mpfr.c
 $ ../../../../sage -br
 ----------------------------------------------------------
 sage: Building and installing modified Sage library files.
 ...
 building 'sage.rings.real_mpfr' extension
 Execute 1 commands (using 1 threads)
 ...
 ----------------------------------------------------------------------
 | Sage Version 4.7.2.alpha1, Release Date: 2011-08-17                |
 | Type notebook() for the GUI, and license() for information.        |
 ----------------------------------------------------------------------
 **********************************************************************
 *                                                                    *
 * Warning: this is a prerelease version, and it may be unstable.     *
 *                                                                    *
 **********************************************************************
 Hello!
 sage:
 }}}
 (This example is of course quite specific to the current layout of the C
 code generated by Cython. Also, for simplicity I've used the less portable
 `-i` option.)

 Just a "proof of concept"; I can write an appropriate shell script for
 your debugging purpose once I've found the relevant ticket... ;-)

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