Pylons
After a decade of writing web applications with Perl CGIs I switched to Python as a programming language and found that writing CGIs became harder than expected. After some research it seemed that most web developers avoid CGIs and rather use MVC frameworks like Django, Turbogears or - my favorite - Pylons. Turns out they were right. Pylons is a very nice web framework for Python programmers which I have used for quite a while to create some honking web applications. If you are familiar with Ruby-on-Rails: it's Ruby-on-Rails in a decent programming language. It's been so much fun to use it and work with other developers that I tried to contribute something to the project. Like...
webhelpers.paginate
Pylons is an awesome MVC web framework written in Python. When I started falling in love with Pylons I mainly disliked its "pagination" module that is used when you want to divide up large result sets into smaller pages. (Think of it as the results of your favorite internet search engine. You get 10 results per page instead of all thousands of matches. That's what pagination does.) So I started writing a new module that has meanwhile been integrated into the webhelpers module that is used by Pylons. It's capable of using AJAX updates for the page area and is highly customizable. I have also written a documentation with code examples for Pylon's documentation site.
To unviciously add to the confusion I have an older version of the module available at my repository (demo site at paginate.workaround.org) that is decoupled from the webhelpers. I have not put the last additions into this standalone version. And honestly I'm considering to give it up in favor of the webhelpers version.
Cheat Sheet
With a little practice Pylons isn't hard to master. But at the beginning you have to deal with a lot of new terminology. Pylons is no all-in-wonder package but rather a nifty glue between some of the most powerful Python components that can be used to create awesome web sites. So you not only have to master Pylons but also those components. My Pylons cheat sheet is supposed to help you reiterate things you learned already or to refer to external documentation.
Introduction chapter
Originally I wanted to write a whole tutorial for Pylons newcomers answering all the questions that I had myself when starting to work with Pylons. But somehow after a few days of preparing a long introductory tutorial I suddenly had to take care of other projects and didn't finish it. The first chapter is pretty finished though so it may help you to read through it anyway to get some answers.
I have reworked that first chapter and it will be used for the pylonshq.com web site as an introduction so it wasn't all for naught.
It unlikely I'll keep working on the other parts as James Gardner has created a great book on Pylons covering all the subjects (and much more) that I intended to write about. The book is available both as dead trees from Apress as well as a free online version.
Using daemontools to keep a Pylons application running
Sometimes I just use GNU screen to start a Pylons application and detach the session. Unfortunately this approach does not survive a reboot. So I started to use daemontools to keep Pylons applications running.
Be careful with easy-install on Debian
easy_install is a half-decent way to automatically install Python modules/packages into your system. In Linux distributions with sophisticated software management like Debian you'll quickly ruin everything unless you are very careful. Before even thinking about using easy-install on Debian please read my warnings. And remember: I told you so.
Recent comments
7 hours 56 min ago
8 hours 32 min ago
1 day 14 hours ago
1 day 22 hours ago
2 days 15 hours ago
2 days 20 hours ago
2 days 22 hours ago
3 days 3 hours ago
6 days 10 hours ago
6 days 18 hours ago