Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
PyEugene - Setting up a Python development environment - 2018-05-21
export ENV=${PWD}/env
echo $ENV
python3 -m venv $ENV
tree -C -L 3 env
$ENV/bin/pip install --upgrade pip setuptools
$ENV/bin/pip install pyramid
$ENV/bin/pip install cookiecutter
$ENV/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-alchemy
from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.response import Response
def hello_world(request):
return Response('Hello World!')
if __name__ == '__main__':
with Configurator() as config:
config.add_route('hello', '/')
config.add_view(hello_world, route_name='hello')
app = config.make_wsgi_app()
server = make_server('', 6543, app)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment