Skip to content

Commit 739ba33

Browse files
committed
Update developer-overview.md
1 parent 6213068 commit 739ba33

1 file changed

Lines changed: 7 additions & 32 deletions

File tree

v3/docs/developer-overview.md

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ Look at the Git history to see when this document was last updated; the more tim
99
elapsed since that date, the more likely things are out-of-date.
1010

1111
I'm assuming that you're competent in Python, JavaScript, command-line-fu, and Google-fu,
12+
and general [command-line BS](http://www.pgbovine.net/command-line-bullshittery.htm),
1213
so I won't do much hand-holding in these directions.
1314

1415
This guide isn't meant to be comprehensive; rather, it's just a starting point for learning about the code
1516
and development workflow. You will undoubtedly still be confused about details after reading it, so
1617
feel free to email philip@pgbovine.net if you have questions.
1718

18-
And please excuse the sloppy writing; I'm not trying to win any style awards here :)
19-
2019

2120
## Getting Started: Running OPT locally on your machine using Bottle:
2221

@@ -30,41 +29,16 @@ And then run:
3029
cd OnlinePythonTutor/v3/
3130
python bottle_server.py
3231

33-
(use `python3` if you want to test the Python 3 backend.)
32+
(Use `python3` if you want to test the Python 3 backend. Note that when you run bottle, you will **always trigger the backend for the version of Python used to invoke it**, so the Python 2/3 toggle selector on the frontend is meaningless. You will also not be able to test other language backends locally.)
33+
3434

3535
If all goes well, when you visit this URL, you should see the Python Tutor visualizer:
3636

3737
http://localhost:8080/visualize.html
3838

3939
Note that you can run bottle with both Python 2 and 3.
4040

41-
However, **only** run this app locally for testing, not in production, since security checks are disabled.
42-
43-
44-
## Alternative: Using Google App Engine (deprecated)
45-
46-
When you check out OPT from GitHub, it's configured by default to run on Google App Engine
47-
(but it can also run fine on a CGI-enabled webserver such as Apache).
48-
49-
To run a local instance, download/install
50-
the Google App Engine [Python SDK](https://developers.google.com/appengine/downloads)
51-
for your OS and then run:
52-
53-
cd OnlinePythonTutor/
54-
dev_appserver.py v3/
55-
56-
Now if you visit http://localhost:8080/ on your browser, you should see the main OPT editor screen.
57-
58-
Congrats! Now you can edit any code in `OnlinePythonTutor/v3/` and reload the page to test your changes.
59-
You don't need to shut down and restart the local webserver after every edit.
60-
61-
btw, using the default configuration, http://localhost:8080/ is actually loading the `v3/visualize.html` HTML file.
62-
(See `v3/pythontutor.py` for details.)
63-
64-
The benefit of running OPT locally is that you can test all changes without going online. So even
65-
if you're eventually going to deploy on something other than Google App Engine, it still makes sense to install locally
66-
for development and testing. The main caveat here is that Google App Engine currently runs Python 2.7,
67-
so you won't be able to test Python 3 locally this way.
41+
However, **only** run this app locally for testing, not in production, since all security checks are disabled.
6842

6943

7044
## Overall system architecture
@@ -114,11 +88,12 @@ app.yaml, pythontutor.py - files for deploying on Google App Engine
11488
web_exec.py - example CGI script for deploying backend on CGI-enabled webservers
11589
```
11690

117-
The backend works with both Python 2 and 3.
91+
The backend works with both Python 2 and 3. (Other language backends are located in [v4-cokapi/](https://github.com/pgbovine/OnlinePythonTutor/tree/master/v4-cokapi), not in v3/)
92+
11893

11994
## Hacking the backend
12095

121-
To modify the backend, you will mainly need to understand `pg_logger.py` and `pg_encoder.py`.
96+
To modify the Python backend, you will mainly need to understand `pg_logger.py` and `pg_encoder.py`.
12297

12398

12499
### Two quick tips for starters

0 commit comments

Comments
 (0)