#delay-discounting-web A web.py python based adaptive algorithm for collecting indifference points at a magnitude of $10
--currently configured for deployment in PythonAnywhere Cloud but can also be run locally on web browser with minor mods--
lpthw.web is only dependency for running on PythonAnywhere - using Python 2.7
modify WSGI file as follows
import os import sys
path = "/home/pysch592/delay-discounting-web/bin/" if path not in sys.path: sys.path.append(path)
from apple import application
DEPENDENCIES FOR RUNNING LOCALLY ONLY If you are new to Python run local first and try starting here...https://bootstrap.pypa.io/get-pip.py
- Install pip from http://pypi.python.org/pypi/pip
- Use ... python -m pip install "--packages you need--"
- distribute from http://pypi.python.org/pypi/distribute
- nose from http://pypi.python.org/pypi/nose/
- virtualenv from http://pypi.python.org/pypi/virtualenv
- lpthw.web ...this is just a fork of web.py made by the author of Learn Python the Hard Way
- Just on PC use ....[Environment]::SetEnvironmentVariable("Path","$env:Path;C:\Python27\Scripts", "User")
If running through Terminal (MAC) execute by entering the following commands after download of skeleton
- export PYTHONPATH=$PYTHONPATH:.
- python bin/apple.py
- then opening web browser (Safari) and navagating to http://localhost:8080/ or pythonanywhere web address for example http://pysch592.pythonanywhere.com
If running in PowerShell or Cmd (PC) execute by entering the following commands after downlaod of skeleton
- $env:PYTHONPATH = "$env:PYTHONPATH;." (works on Powershell) or set PYTHONPATH=%PYTHONPAT%;C:\location of dir (works on Cmd)
- python bin/apple.py
- then opening web browser (Chrome) and navagating to http://localhost:8080/ or pythonanywhere web address for example http://pysch592.pythonanywhere.com
User data are saved to test.txt in main. Setup to run one participant at a time with no user ID test.txt will not close if user does not complete program and may cause subsiquent errors following runs without reloading on server.
ctrl-c is used to terminate program
test folder is for running nosetests...