File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import pg_logger , pprint
1+ import pg_logger , pprint , json
22
33pp = pprint .PrettyPrinter ()
44
55def pprint_finalizer (trace ):
66 for e in trace :
77 pp .pprint (e )
88
9- pg_logger .exec_script_str (open ('example-code/closures/closure3.txt' ).read (), pprint_finalizer )
9+
10+ def json_finalizer (output_lst ):
11+ json_output = json .dumps (output_lst , indent = None ) # use indent=None for most compact repr
12+ print json_output
13+
14+
15+ pg_logger .exec_script_str (open ('example-code/towers_of_hanoi.txt' ).read (), json_finalizer )
Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ ExecutionVisualizer.prototype.render = function() {
8888 <button id="editBtn" class="medBtn" type="button">Edit code</button>\
8989 </div>\
9090 <div id="executionSliderCaption">\
91- Hover here to focus and then use the left and right arrow keys to<br/>\
91+ Click to focus and then use the left and right arrow keys to<br/>\
9292 step through execution. Click on lines of code to set breakpoints.\
9393 </div>\
9494 <div id="executionSlider"/>\
@@ -288,9 +288,12 @@ ExecutionVisualizer.prototype.setKeyboardBindings = function() {
288288
289289 // focus on mouse entering td#left_pane (so that the user doesn't need
290290 // to click to focus)
291+ // This is actually annoying because the display JERKS to focus on elements ...
292+ /*
291293 leftTablePane.mouseenter(function() {
292294 leftTablePane.focus();
293295 });
296+ */
294297
295298
296299 leftTablePane . keydown ( function ( k ) {
You can’t perform that action at this time.
0 commit comments