Simon Willison’s Weblog

Subscribe
Atom feed for python

1,085 items tagged “python”

The Python programming language.

2008

Djangofriendly (via) Ryan Berg’s attractive new site collecting ratings and reviews for web hosts that support Django. I’m still happily hosted on a bytemark VPS, which isn’t currently listed on the site.

# 26th March 2008, 8:47 am / ryan-berg, django, hosting, bytemark, python, vps

Better Use of Newforms. Two really neat techniques: using an inclusion tag template to DRY your custom form templates, and adding what-to-do-next methods to the form class itself to cut down on the application code in your views.

# 25th March 2008, 10:53 pm / django, newforms, dry, python, peter-baumgartner

fireeagle_api.py. Steve Marshall’s Fire Eagle python binding on GitHub.

# 22nd March 2008, 11:57 pm / github, steve-marshall, fireeagle, python

PownceFS. Not a joke: it’s a Fuse filesystem (written in Python, using OAuth for authentication) which exposes a directory for each of your friends on Pownce containing the files that they have uploaded.

# 22nd March 2008, 11:18 pm / pownce, python, oauth, fuse, powncefs, richard-crowley

views.py for wikinear.com (via) I’ve published the views.py file from wikinear.com as an example of simple Fire Eagle integration with a Django application.

# 22nd March 2008, 7:23 pm / fireeagle, django, python, django-snippets, wikinear

Monkeypatching is Destroying Ruby (via) Deliberately provocative title, but makes a well considered case for restrained use of monkey patching in Ruby. Cultural norms around monkey patching seem to me to be one of the core differences between the Ruby and Python communities.

# 22nd March 2008, 12:27 am / ruby, python, ian-bicking, monkeypatching

Version 2.0 of mod_wsgi is now available. Includes features that should make Python (and Django) on shared hosting much easier: a non-root user can touch their WSGI script file to restart just their application’s daemon processes when they make changes and Python virtual environments are supported to allow different versions of packages without interference.

# 21st March 2008, 1:23 pm / modwsgi, python, django, wsgi, hosting, sharedhosting

mysql_cluster (via) My Russian isn’t all that good, but this looks like a neat way of getting Django to talk to a master/slave setup, written by Ivan Sagalaev. UPDATE: English docs are linked from the comments.

# 21st March 2008, 8:45 am / masterslave, ivansagalaev, django, mysqlcluster, orm, python, replication

A Toy Chat Server with Eventlet and Mulib (via) Eventlet (the Python non-blocking IO library originally written for Second Life) is ideally suited to building Comet servers; Chuck Thier demonstrates a simple chat server in a small amount of code.

# 21st March 2008, 3:28 am / comet, eventlet, lindenlab, secondlife, chuckthier, python, mulib

Simple Exception Response for AJAX debugging. Neat solution to the problem of Django error pages showing up as raw HTML in the Firebug Ajax log.

# 19th March 2008, 4:44 pm / ajax, firebug, django, python

IronPython, MS SQL, and PEP 249. How Dino Viehland got Django’s ORM to talk to the .NET database layer.

# 19th March 2008, 9:46 am / dinoviehland, dotnet, microsoft, django, python, ironpython, mssql, pep249, sql

Queryset Implementation. Malcolm explains the work that has gone in to the queryset-refactor branch. Executive summary: Python’s ORM is probably a lot better at SQL than you are.

# 19th March 2008, 9:43 am / sql, orm, python, django, querysetrefactor, malcolmtredinnick

Integrating reCAPTCHA with Django. Looks pretty straight forward.

# 19th March 2008, 9:41 am / recaptcha, django, captcha, python

Django on IronPython. Dino Viehland demonstrated Django running on IronPython and SQL Server at PyCon.

# 17th March 2008, 4:05 pm / sqlserver, python, ironpython, pycon, microsoft, dinoviehland

Hacking Contributed Models. Neat Django trick using monkeypatching to make some minor tweaks to built-in contributed models such as auth or flatpages.

# 11th March 2008, 5:51 am / django, contrib, monkeypatching, python

python4ply tutorial. python4ply is a parser for Python written in Python using the PLY toolkit, which compiles to Python bytecode using the built-in compiler module. The tutorial shows how to use it to add support for Perl-style 1_000_000 readable numbers.

# 11th March 2008, 5:49 am / python, python4ply, lexing, parsing, compilers

Windows Live ID Delegated Authentication. Would make life a lot simpler if they just supported OAuth, but at least they include sample code in Python, Ruby and PHP.

# 8th March 2008, 3:19 pm / python, ruby, php, microsoft, live, oauth, liveid

In-Depth django-sphinx Tutorial. Another neat Django extension from the guys at Curse: easy integration with the sphinx full text search engine.

# 5th March 2008, 12:03 am / django, curse, python, sphinx-search, search, david-cramer

Jython’s Future Looking Sunny. Sun have (finally) invested in Jython, hiring lead maintainer Frank Wierzbicki. They’ve also hired Ted Leung to “represent the wider world of Python at Sun”. Great news.

# 3rd March 2008, 4:08 pm / python, jython, sun, ted-leung, frank-wierzbicki

queryset-refactor changeset 7126. Malcolm just checked model inheritance in to the queryset-refactor branch, with full documentation and unit tests. People have been requesting this for ages.

# 18th February 2008, 9:46 am / inheritance, python, django, querysetrefactor

Mono Beta Launch—Official Linden Blog. The Mono VM is now in public beta testing running LSL scripts in Second Life. The first step on the road to IronPython support?

# 30th January 2008, 2:19 am / secondlife, ironpython, python, lindenlab, virtualmachines, mono, lsl

Python Web Framework on the JVM. An update on both Jython and the Django on Jython project—it looks like Jython 2.5 isn’t that far away.

# 30th January 2008, 2:06 am / django, python, jython, java, jvm

Monkeypatching idioms—elegant or ugly? Guido offers a decorator and a metaclass as syntactic sugar for monkeypatching existing Python classes.

# 30th January 2008, 12:39 am / metaclasses, decorators, python, guido-van-rossum, monkeypatching, idioms

Linkherd—django. Linkherd is a Django-powered startup that offers sub-reddit style functionality. I’ve set up a Django site there as well.

# 26th January 2008, 11:58 pm / django, python, community, linkherd

Django sub-reddit. Reddit are trialling the ability to create custom sub-reddits, so I put one up for Django links and discussions.

# 26th January 2008, 11:56 pm / django, reddit, python, community

Community sites on Django People. Small new feature: I can now add community sites to individual country pages. If you know of any regional community sites that I’ve missed, let me know in a comment or by e-mail.

# 25th January 2008, 12:40 am / django-people, community, brazil, python, django

Django People: OpenID and microformats

In hindsight, it was a mistake to launch Django People without support for OpenID. It was on the original feature list, but in the end I decided to cut any feature that wasn’t completely essential in order to get the site launched before it drowned in an ocean of “wouldn’t-it-be-cool-ifs”.

[... 626 words]

Django People: Colophon. I’ve added a colophon to Django People, something I try to do for all of my personal projects.

# 23rd January 2008, 4:58 pm / colophon, django-people, python, django

Caching Layer for Django ORM. Interesting extension to Django’s ORM that adds automatic caching of querysets and smart cache invalidation.

# 23rd January 2008, 3:18 pm / django, orm, david-cramer, caching, python, ormcaching

World’s ugliest Django app. Brilliant hack from Paul Bissex: a self-contained Django application in 70 lines of code which shows off some internals trickery and makes use of a bunch of handy django.contrib packages.

# 22nd January 2008, 1:34 am / django, paul-bissex, python, selfcontained