|
| 1 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | +<html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 | + |
| 4 | +<!-- |
| 5 | +
|
| 6 | +Usage: Put a valid trace file in test-trace.js, and it will render when |
| 7 | +you load this file. see here for directions: |
| 8 | +
|
| 9 | +https://github.com/pgbovine/OnlinePythonTutor/blob/master/v3/docs/opt-trace-format.md#interlude-viewing-a-trace-in-the-opt-frontend |
| 10 | +
|
| 11 | + --> |
| 12 | + |
| 13 | +<head> |
| 14 | + <title>Online Python Tutor embedding demo</title> |
| 15 | + |
| 16 | +<!-- dependencies for pytutor.js --> |
| 17 | +<script type="text/javascript" src="js/d3.v2.min.js"></script> |
| 18 | +<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script> |
| 19 | +<script type="text/javascript" src="js/jquery.simplemodal.js"></script> <!-- for questions --> |
| 20 | +<script type="text/javascript" src="js/jquery.ba-bbq.min.js"></script> <!-- for handling back button and URL hashes --> |
| 21 | +<script type="text/javascript" src="js/jquery.jsPlumb-1.3.10-all-min.js "></script> <!-- for rendering SVG connectors |
| 22 | + DO NOT UPGRADE ABOVE 1.3.10 OR ELSE BREAKAGE WILL OCCUR --> |
| 23 | +<script type="text/javascript" src="js/jquery-ui-1.8.24.custom.min.js"></script> <!-- for sliders and other UI elements --> |
| 24 | +<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.24.custom.css" rel="stylesheet" /> |
| 25 | +<link type="text/css" href="css/basic.css" rel="stylesheet" /> |
| 26 | + |
| 27 | +<!-- Python Tutor frontend code and styles --> |
| 28 | +<script type="text/javascript" src="js/pytutor.js"></script> |
| 29 | +<link rel="stylesheet" href="css/pytutor.css"/> |
| 30 | + |
| 31 | + |
| 32 | +<!-- This JavaScript file contains the demo code - READ IT!!! |
| 33 | + (Include this file AFTER all of its dependencies.) |
| 34 | +--> |
| 35 | +<script type="text/javascript" src="test-trace.js"></script> |
| 36 | +<script type="text/javascript"> |
| 37 | +$(document).ready(function() { |
| 38 | + var myViz = new ExecutionVisualizer('myDiv', trace /* from test-trace.js */, |
| 39 | + {debugMode: true}); |
| 40 | +}); |
| 41 | +</script> |
| 42 | + |
| 43 | +</head> |
| 44 | + |
| 45 | +<body> |
| 46 | + <div id="myDiv"></div> |
| 47 | +</body> |
| 48 | +</html> |
0 commit comments