This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import argparse | |
import os | |
import subprocess | |
import sys | |
import tempfile | |
import urllib.request | |
import venv | |
setuptools_version = "1.1.6" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import os | |
from datetime import datetime | |
from babel.dates import format_datetime | |
import sqlalchemy as sa | |
import sqlalchemy.orm as orm | |
from sqlalchemy.ext.declarative import declarative_base | |
from zope.sqlalchemy import ZopeTransactionExtension |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[buildout] | |
extensions = mr.developer | |
parts = zope2 | |
instance | |
zopeskel | |
extends = http://download.zope.org/Zope2/index/2.13.20/versions.cfg | |
[sources] | |
;guestbook = fs guestbook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from datetime import datetime | |
from babel.dates import format_datetime | |
from markupsafe import escape, Markup | |
from tg import expose, TGController, AppConfig, redirect | |
import sqlalchemy as sa | |
import sqlalchemy.orm as orm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[app] | |
recipe = zc.recipe.egg | |
eggs = ${eggs:main} | |
pyramid | |
interpreter = py | |
[dev-app] | |
recipe = zc.recipe.egg | |
eggs = ${eggs:main} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[app] | |
recipe = zc.recipe.egg | |
eggs = ${eggs:main} | |
interpreter = py | |
[paster_ini] | |
recipe = z3c.recipe.template | |
input = production.ini.in | |
output = ${buildout:parts-directory}/etc/production.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
install setuptools, pip, virtualenv | |
- ez_setup.py | |
- get-pip.py | |
""" | |
import re |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python get-pip.py | |
Downloading/unpacking pip | |
Using download cache from /home/aodag/.pip/eggs/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fpy2.py3%2Fp%2Fpip%2Fpip-1.5.1-py2.py3-none-any.whl | |
Downloading/unpacking setuptools | |
Downloading setuptools-2.1-py2.py3-none-any.whl (540kB): 540kB downloaded | |
Storing download in cache at /home/aodag/.pip/eggs/https%3A%2F%2Fpypi.python.org%2Fpackages%2F3.4%2Fs%2Fsetuptools%2Fsetuptools-2.1-py2.py3-none-any.whl | |
Installing collected packages: pip, setuptools | |
Successfully installed pip setuptools | |
Cleaning up... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tornado.web | |
from tornado.platform.asyncio import AsyncIOMainLoop | |
import asyncio | |
class MainHandler(tornado.web.RequestHandler): | |
def get(self): | |
self.write("Hello") | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import asyncio | |
from aiohttp.wsgi import WSGIServerHttpProtocol | |
logger = logging.getLogger(__name__) | |
def index(environ, start_response): | |
logger.info("GET") | |
start_response("200 OK", | |
[('Content-type', 'text/plain')]) |