web.py and the 2 minute wiki
A lot of people use my applications and then email me asking me which language and toolkits I used to build them. The language for both tasktoy and lazybase was Python, which is my favourite programming language. tasktoy was built using Zope and LazyBase using Turbogears.
Recently I built a new application, which I’ll be sharing with the world shortly (since I’m taking Spanish classes now, it’s a tool to assist with learning a foreign language — you can email me if you’re curious to hear more). Since I’m a big fan of reddit, I decided to try out web.py. I was amazed at the simplicity with which I could download and “install” the necessary pieces, and how quickly I could get a basic application up and running.
This got me thinking about all the tutorials for other frameworks, which show how to build a wiki in x minutes. The number typically doesn’t include time to install and configure the framework. So, as a simple test, I decided to see how fast I could, from a fresh python install, download and install the necessary components and build a wiki. My only requirement was that it support multiple pages, basic formatting, and internal and external links.
First, a few disclaimers:
- This is an uncontrolled experiment, not intended to prove anything, simply to satisfy my own curiosity. I make no claims about the superiority of any language or framework.
- This code was written very quickly. It is intended to work, not to be pretty, extensible, maintainable, or use design patterns.
- I had already used web.py for another project, so there was no learning curve. I did not consult any documentation while writing the code.
- This certainly does not represent the best way to use web.py. I put HTML in the code instead of using templates and I used an embedded database.
My results were:
Download and install markdown.py: ~1m (mostly clicking through sourceforge)
Write the wiki code: 2m21s (the only part that I timed with a stopwatch)
I wanted to post the code, but Wordpress doesn’t seem to render it properly. You can look at it here.
Finally, a screenshot of the program in action:

August 4th, 2006 at 1:24 am
Wow, that is very cool!
August 4th, 2006 at 5:08 am
Whoa, that’s just neat. I currently use Code Igniter for PHP, and it’s nowhere near as RAD as that
August 4th, 2006 at 10:46 am
Very cool but depot isn’t far away. I’m sure we can top 2.21s…
Coming soon.
August 4th, 2006 at 11:48 am
2:21 not ~2s
August 5th, 2006 at 7:22 am
simple and nice example.
rather than using ‘view’ as the class name, I prefer to named it ‘wiki’ (verb vs nouns). this fit well in web.py paradigm where you’re ‘GET’ting nouns, not verb.
August 12th, 2006 at 2:20 am
[…] kiwitobes.com ยป web.py and the 2 minute wiki (tags: python wiki web.py web programming development tutorial code) […]