#7509: notebook -- make it possible to debug Python code in the notebook, e.g.,
something like pdb that works in the notebook
---------------------------+------------------------------------------------
   Reporter:  was          |          Owner:  boothby     
       Type:  enhancement  |         Status:  needs_review
   Priority:  major        |      Milestone:  sage-5.0    
  Component:  notebook     |       Keywords:              
Work_issues:               |       Upstream:  N/A         
   Reviewer:               |         Author:              
     Merged:               |   Dependencies:              
---------------------------+------------------------------------------------

Comment(by was):

 Replying to [comment:8 ppurka]:
 > Should line 192 of your patch contain the string as r""" """?
 > {{{
 >         t = """%s<hr>> %s"""%(code, file)
 > }}}

 No.  r is *only* needed if your string contains backslashes and you don't
 want to escape them.  It has nothing to do with HTML tags at all.

 > I see that "< >" constructs are eaten away by the browser.

 Above t is an HTML string that I'm construting, and output within an
 <html> block for the notebook.  It thus gets displayed properly.

 > An example code which you can use to debug your `Debug()` (pun intended
 :)) is the following:
 > {{{
 > ReedSolomonCode(15,2,GF(16,'a')).minimum_distance()
 > }}}
 > You need to go to stack frame 8, and look at line 396 of the code that
 is printed.

 Ah, now I see what you mean. The stupid source code display needs to have
 some HTML escaping done, e.g., < turned to &lt;.  There is a function in
 the notebook that does that properly, and I'll fix the patch accordingly.
 Thanks for finding a genuine bug.  I'll also modify my example functions
 to include something like.


 >
 > Otherwise, it functions very nicely!

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