Skip to content

Instantly share code, notes, and snippets.

@nutjob4life
Created July 26, 2012 22:23
Show Gist options
  • Save nutjob4life/3184956 to your computer and use it in GitHub Desktop.
Save nutjob4life/3184956 to your computer and use it in GitHub Desktop.
Works for me?
fatalii 209 % date
Thu Jul 26 17:20:56 CDT 2012
fatalii 210 % sw_vers
ProductName: Mac OS X
ProductVersion: 10.8
BuildVersion: 12A269
fatalii 211 % curl -LO 'https://raw.github.com/pypa/virtualenv/master/virtualenv.py'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 105k 100 105k 0 0 100k 0 0:00:01 0:00:01 --:--:-- 186k
fatalii 212 % /usr/bin/python virtualenv.py --distribute /tmp/workie
New python executable in /tmp/workie/bin/python
Installing distribute..................................................................................................................................................................................................done.
Installing pip......................done.
fatalii 213 % cd /tmp/workie
/tmp/workie
fatalii 214 % bin/pip install web.py
Downloading/unpacking web.py
Downloading web.py-0.37.tar.gz (90Kb): 90Kb downloaded
Running setup.py egg_info for package web.py
Installing collected packages: web.py
Running setup.py install for web.py
Successfully installed web.py
Cleaning up...
fatalii 215 % bin/python
Python 2.7.2 (default, Jun 20 2012, 16:23:33)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import web
>>> urls = ('/(.*)', 'hello')
>>> app = web.application(urls, globals())
>>> class hello:
... def GET(self, name):
... if not name: name = 'World'
... return 'Hello, ' + name + '!'
...
>>> app.run()
http://0.0.0.0:8080/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment