Skip to content

Commit

Permalink
Update python3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ahendy committed Feb 16, 2017
1 parent 290091a commit 0b6c12b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/flask_snake/Getting-Started.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
1. Install Python & pip https://www.python.org/downloads/
2. (optional but recommended)
a. Install virtualenvwrapper https://virtualenvwrapper.readthedocs.io/en/latest/install.html
b. "mkvirtualenv snake" & "workon snake"
b. "mkvirtualenv snake" or (python3) "mkvirtualenv --python=`which python3` snake"
c. "workon snake"
3. cd to this directory (examples/flask_snake) and "pip install -r requirements.txt"
4. Run python snake.py (python2.7) or python3 snake.py (python 3.5)
5. Make the Snake a bit smarter!
4 changes: 2 additions & 2 deletions examples/flask_snake/snake.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def start():
# NOTE: 'request' contains the data which was sent to us about the Snake game
# after every POST to our server
print request.__dict__
print(request.__dict__)

snake = {
"color": "ffffff",
Expand All @@ -18,7 +18,7 @@ def start():

@app.route("/move", methods=["POST"])
def move():
print request.__dict__
print(request.__dict__)

moves = ["up", "down", "left", "right"]
response = {
Expand Down

0 comments on commit 0b6c12b

Please sign in to comment.