diff --git a/docs/webpython/Dockerfile b/docs/webpython/Dockerfile deleted file mode 100644 index 54d6d4ad..00000000 --- a/docs/webpython/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM ubuntu:14.04 -MAINTAINER "Martin v. Löwis" -RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 -ENV PYTHONPATH $PYTHONPATH:/usr/lib/python3.4:/workspace -ENV PATH $PATH:/usr/lib/python3.4 -ADD assess.py /usr/lib/python3.4/assess.py -ADD webpython.py /usr/lib/python3.4/webpython.py -RUN rm /usr/lib/python3.4/turtle.py -ADD turtle.py /usr/lib/python3.4/turtle.py -RUN adduser --disabled-password --gecos Python python -USER python \ No newline at end of file diff --git a/docs/webpython/Makefile b/docs/webpython/Makefile deleted file mode 100644 index 76f102b7..00000000 --- a/docs/webpython/Makefile +++ /dev/null @@ -1,58 +0,0 @@ -CODEMIRROR=html/js/codemirror.js - -all: logs - -logs: - mkdir logs - -# These are put into source control -generated: $(CODEMIRROR) - - -$(CODEMIRROR): CodeMirror/lib/codemirror.js CodeMirror/mode/python/python.js - (cd CodeMirror; bin/compress codemirror python) > $@ - -run: all kill - twistd -l logs/webpython.log -y webpython.tac - -runpy: killpy - twistd --pidfile pylaunch.pid -l logs/pylaunch.log -y pylaunch.tac - -manager: all killmanager - twistd --pidfile manager.pid -l logs/manager.log -y manager.tac - -kill: - if [ -f twistd.pid ];\ - then\ - kill `cat twistd.pid`;\ - fi - -killpy: - if [ -f pylaunch.pid ];\ - then\ - kill `cat pylaunch.pid`;\ - fi - -killmanager: - if [ -f manager.pid ];\ - then\ - kill `cat manager.pid`;\ - fi - -docker: - docker.io build --rm -t webpython . - -update: - git pull - make docker - service webpython-worker restart - -rmexited: - docker.io ps -a|grep 'Exit '|awk '{print $$1;}'|xargs docker.io rm - -rmi: - docker.io rmi $$(docker.io images | grep "^" | awk '{print $$3;}') - -killold: - -docker.io ps | egrep 'hours? ago' |awk '{print $$1}'|xargs docker.io kill - -killall -o 30m -9 python3 diff --git a/docs/webpython/README.md b/docs/webpython/README.md deleted file mode 100644 index 0d74cfd5..00000000 --- a/docs/webpython/README.md +++ /dev/null @@ -1,47 +0,0 @@ -Local setup -=========== - -1. `git checkout webpython-hybrid` -2. Make sure to install all dependencies and migrations: - - rake db:migrate - bundle install - -3. Create a new docker image containing the Turtle library and the i/o wrapper: - - cd webpython - docker build -t IMAGE_NAME . - -4. Configure your Docker host at `config/docker.yml.erb`. Make sure to add a websocket host, for example like this (this is probably different for you): - - host: tcp://localhost:2375 - ws_host: ws://localhost:2375 - -5. Run the CodeOcean server with `rails s -p 7000` - -6. Login with admin@example.org (pw: admin) and create a new execution environment picking the newly created Docker image from the dropdown. Set the initial command to: - - cd /usr/lib/python3.4 && python3 webpython.py - -7. Create a new exercise for the newly created execution environment with an arbritrary main file. -8. Implement the exercise. The code below can be used as an example to see the canvas and I/O in action: - - import turtle - wn = turtle.Screen() - alex = turtle.Turtle() - - # i/o test - print("hello!") - print("please enter your name") - name = input() - print("your name is", name) - - # canvas test - alex.forward(50) - alex.right(90) - alex.forward(30) - alex.right(90) - alex.forward(30) - - wn.mainloop() - diff --git a/docs/webpython/assess.py b/docs/webpython/assess.py deleted file mode 100644 index 23b72c79..00000000 --- a/docs/webpython/assess.py +++ /dev/null @@ -1 +0,0 @@ -# moved to dockerfiles/ubuntu-python diff --git a/docs/webpython/turtle.py b/docs/webpython/turtle.py deleted file mode 100644 index 64d53f10..00000000 --- a/docs/webpython/turtle.py +++ /dev/null @@ -1 +0,0 @@ -# moved to dockerfiles/ubuntu-python/turtle.py diff --git a/docs/webpython/webpython.py b/docs/webpython/webpython.py deleted file mode 100644 index 2e0c6c00..00000000 --- a/docs/webpython/webpython.py +++ /dev/null @@ -1 +0,0 @@ -# moved to dockerfiles/ubuntu-python/webpython.py