Skip to content

Commit 2c438fc

Browse files
author
Philip Guo
committed
updated readme
1 parent 2ed7728 commit 2c438fc

1 file changed

Lines changed: 30 additions & 29 deletions

File tree

README

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Using this tool, teachers and students can write small Python code
2727
snippets together and see what happens to the data structures when the
2828
code gets executed.
2929

30-
Try it out live at: http://people.csail.mit.edu/pgbovine/python/
30+
Try it out live at: http://www.onlinepythontutor.com/
3131

3232
======
3333
System architecture overview:
@@ -49,16 +49,32 @@ back-end, and then rendering that trace as data structure
4949
visualizations. The front-end code resides in these files in the
5050
current directory:
5151

52-
index.html
52+
tutor.html
53+
question.html
5354
edu-python.js
55+
edu-python-tutor.js
56+
edu-python-questions.js
5457
edu-python.css
55-
jquery-1.3.2.min.js
5658
jquery.textarea.js
5759
.htaccess - to increase the size of allowed Apache HTTP responses
5860

61+
(there are also other 3rd-party JavaScript library files)
62+
63+
Note on .htaccess: If your server limits the size of responses received
64+
from HTTP requests, then you might need to use the following .htaccess
65+
file included in your top-level (front-end) directory, to allow the
66+
Online Python Tutor to receive traces from the back-end:
67+
68+
<IfModule mod_security.c>
69+
70+
# Set a ~2MB limit for response headers (bigger than default 512K limit)
71+
SecResponseBodyLimit 2000000
72+
73+
</IfModule>
74+
5975

6076
The back-end is a server-side CGI application that takes Python script
61-
source code as input, executes the entire script (up to 100 executed
77+
source code as input, executes the entire script (up to 200 executed
6278
lines, to prevent infinite loops), and collects a full trace of all
6379
variable values (i.e., data structures) after each line has been
6480
executed. It then sends that full trace to the front-end in a
@@ -68,37 +84,22 @@ through execution.
6884

6985
The back-end resides in the cgi-bin/ sub-directory in this repository:
7086

71-
cgi-bin/web_exec.py - the CGI entrance point to the back-end
72-
cgi-bin/pg_logger.py - the 'meat' of the back-end
73-
cgi-bin/pg_encoder.py - encodes Python data into JSON
74-
cgi-bin/demjson.py - 3rd-party JSON module, since Python 2.5
75-
doesn't have the built-in 'import json'
76-
cgi-bin/create_db.py - for optional sqlite query logging
77-
cgi-bin/db_common.py - for optional sqlite query logging
78-
cgi-bin/.htaccess - for Apache CGI execute permissions
79-
cgi-bin/run_tests.py - back-end regression tests
87+
cgi-bin/web_exec.py - the CGI entrance point to the back-end
88+
cgi-bin/web_run_test.py - the CGI entrance point to the question
89+
grading back-end
90+
cgi-bin/pg_logger.py - the 'meat' of the back-end
91+
cgi-bin/pg_encoder.py - encodes Python data into JSON
92+
cgi-bin/demjson.py - 3rd-party JSON module, since Python 2.5
93+
doesn't have the built-in 'import json'
94+
cgi-bin/create_db.py - for optional sqlite query logging
95+
cgi-bin/db_common.py - for optional sqlite query logging
96+
cgi-bin/.htaccess - for Apache CGI execute permissions
8097

8198

8299
Due to the AJAX same-origin policy, the front-end and back-end must be
83100
deployed on the same server (unless you do some fancy proxy magic).
84101

85102

86-
======
87-
Misc. notes
88-
89-
If your server limits the size of responses received from HTTP requests,
90-
then you might need to add the following .htaccess file in your
91-
top-level (front-end) directory, in order to allow Online Python Tutor
92-
to receive traces from the back-end:
93-
94-
<IfModule mod_security.c>
95-
96-
# Set a ~2MB limit for response headers (bigger than default 512K limit)
97-
SecResponseBodyLimit 2000000
98-
99-
</IfModule>
100-
101-
102103
======
103104
Original founding vision (from January 2010):
104105

0 commit comments

Comments
 (0)