Archive for February, 2006

TurboGears 0.9 QuickReference available

Wednesday, February 22nd, 2006

Mark Ramm has uploaded the latest TurboGears 0.9 Alpha Quick Reference Guide. Everything you need to know about TurboGears in one handy page. Looks nice.

Less magic is a good thing

Wednesday, February 22nd, 2006

Pradeep Kishore Gowda likes the new magic-removal branch:

I’d played around with Django when it was initially anounced, but was thrown off by all the magic stuff. The new “magic-removal” branch has made Django very much Pythonic. The admin interface is a great plus to get the website live without having to code the “input” parts.

Sounds like the Django people are doing some good work. I look forward to their next official release.

Update: Django hates magic!

Orthogonality considered pretentious

Wednesday, February 22nd, 2006

Ian Bicking says that orthogonality is pretentious. If I understand correctly, he means that well designed languages/systems (i.e. ones that are orthogonal) are less desireable for beginning programmers and “mediocre experienced programmers.” Therefore, presumably, less people are apt to use them.

So, that’s why PHP is so popular. And it’s entirely deserved. And Basic before it — another language that seems so painful because of the lack of orthogonality, but that is both its curse and greatest feature.

Thus, while it’s “bad design” for PHP to have a million functions that possibly overlap, it’s “good” in the sense that you can skim the whole list and see what you need. Makes it easy for beginners, because that’s how they think. He then goes on to compare this to Django templates.

Read the whole thing. It’s really a thoughtful piece.

PyWeek approaches

Tuesday, February 21st, 2006

Just a reminder that registration for PyWeek 2 starts this Friday. The actual contest starts 00:00UTC Sunday 26th March and ends 00:00UTC Sunday 2nd April.

See the challenge rules for details.

Simple overview of WSGI

Tuesday, February 21st, 2006

Defined in PEP 333, WSGI is a specification for the interface between web servers and web applications. Rick Copeland posted a nice, simple overview of WSGI for beginners.

Quoth Rick:

In all the posting and hype about full-featured frameworks, you may have overlooked a very small “un-framework”, the Python web server gateway interface (WSGI). It’s generally an option for deploying the large frameworks such as TurboGears or Django. What follows is a very simple and brief overview of how you can create a WSGI-compliant application server.

Worth reading if you want to get into the realm of Python web frameworks.

Python progress meter

Monday, February 20th, 2006

The ASPN Python Cookbook has a pretty cool script to make wget/emerge style, text based progress meters. After importing the necessary class, the actual code to use it is quite simple.

Here’s an example using random update speeds:

#!/usr/bin/env python import progress import time import random total = 1000 p = progress.ProgressMeter(total=total) while total > 0: cnt = random.randint(1, 25) p.update(cnt) total -= cnt time.sleep(random.random())

I noticed that it doesn’t really work in the Windows console, and according to the comments, it doesn’t work in OS X either. So (as written) it’s a Linux thing. If you check out the ASPN page, however, there are some proposed fixes/improvements.

Praise for lighttpd

Monday, February 20th, 2006

Dean Ellis seems to be happy with his lighttpd experience so far:

So, lighttpd appears on my personal radar; by all accounts (verified now by personal experience) the FastCGI support is excellent. On top of that, server/site configuration is also a breeze. I won’t even bother to discuss performance (top notch).

Just that fast, I’ve stopped using Apache and started using lighttpd. I’m sure I will eventually encounter some reason why I should use both, but so far that reason does not exist and lighttpd is far and away my new favorite web server.

Playing with lighttpd has been on my “todo” list for quite some time. It’s one of those projects that I keep reading good things about, and I always think, “Wow, I should check that out.”

Also, it sounds like he was able to get Django working with lighttpd and FastCGI with a minimal amount of pain. Cool.

Python programming videos

Sunday, February 19th, 2006

ShowMeDo has fourteen Python programming screencasts. They include a beginner’s tutorial series, and three other series covering IPython, SPE, and wxPython. I haven’t watched them yet, but they are getting a fair amount of buzz.

The IPython set might be interesting.

The pragmatic programmer

Sunday, February 19th, 2006

It seems like more and more I’m reading that the Pragmatic Programmer series of books is choice of geeks rather than the standard O’Reilly fare. Here’s an example:

While I start working on this project, I have two books that I’m going to be keeping handy, in both their print and PDF forms:

Both of these are titles released by the Pragmatic Programmer, which has taken over from O’Reilly as my main book source for this field. Their books are well written, edited, and most of all, the examples and methodology are focused on delivering a high density of knowledge in a minimum of space.

For what it’s worth, I haven’t been overly impressed with O’Reilly’s Python offerings. Instead I’ve become a fan of the Apress books instead. Beginning Python and Python Network Programming are two of my favorites.

How to install Python eggs

Saturday, February 18th, 2006

Nate Silva explains how to install a Python .egg file the easy way. Much easier than hunting through the documentation.

Update 5/14/07: Broken link fixed.

Update 8/20/08: Site appears to be permanently down. Oh well. :(