Simon Willison’s Weblog

Subscribe
Atom feed for python

1,085 items tagged “python”

The Python programming language.

2009

Whoosh. A brand new, pure-python full text indexing engine (think Lucene). Claims to offer performance in the same league as wrappers to C or Java libraries. If this works as well as it claims it will be an excellent tool for adding search to projects that wish to avoid a dependency on an external engine.

# 12th February 2009, 12:49 pm / search, python, whoosh, lucene, open-source, full-text-search

Django Settings Tip—Setting Relative Paths. This is the first thing I do in every single one of my Django projects—it makes projects relocatable to other machines with just a couple of lines of code. I wouldn’t be at all upset to see it added to the default Django settings.py file created by ./manage.py startproject

# 12th February 2009, 12:30 pm / django, python, gareth-rushgrove, settings

Google App Engine: A roadmap update! Receiving e-mail, background tasks and XMPP. I predict a bunch of sites will start building small parts of their overall functionality on App Engine when some of these features land (much easier than hosting your own custom XMPP server).

# 9th February 2009, 7 pm / appengine, python, google, xmpp, email, cloud-computing

jessenoller.com—python magazine. Jesse Noller has been sharing his articles originally published in Python Magazine. Topics include SSH programming with Paramiko, context managers and the with statement and an excellent explanation of Python’s threading support and the global interpreter lock.

# 5th February 2009, 11:10 pm / jessenoller, python, pythonmagazine, ssh, paramiko, threading, gil, contextmanagers

solango. Another attempt at a Django/Solr integration library, based on code written for “a top 20 newspaper site” (I’d love to know which one). This is well documented, uses a registration model clearly inspired by the Django admin which keeps search related metadata out of your regular models and includes management commands for re-indexing and generating Solr schema.xml files.

# 4th February 2009, 12:22 pm / solr, django, python, lucene, search

juno. An ultra-lightweight Python web framework inspired by Ruby’s Sinatra.

# 4th February 2009, 10:48 am / python, ruby, sinatra, juno, webframeworks

Changeset 9793: SMTP testing documentation. I didn’t know this trick: running “python -m smtpd -n -c DebuggingServer localhost:1025” will start up a simple SMTP server which dumps received e-mails to the terminal instead of forwarding them on.

# 29th January 2009, 1:35 pm / email, smtp, python, testing, django

Giant, Python Powered Robots. “They each weigh about 11 tonnes and have a 17 meter reach. The control system is written in Python, with small sections of C which run in hard-real-time to guarantee safety.”

# 28th January 2009, 10:35 am / python, robots, awesome, realtime

Sharding Counters on Google App Engine. “While the datastore for App Engine scales to support a huge number of entities it is important to note that you can only expect to update any single entity, or entity-group, about five times a second”. This article explains a technique for sharding writes across multiple counters in detail, including a way to keep a memcache counter updated at the same time for faster reads.

# 27th January 2009, 8:27 pm / memcache, caching, sharding, googleappengine, google, appengine, python, scaling

Dive into Python 3. Mark Pilgrim’s seminal work taught me Python nearly eight years ago. Now he’s updating it to cover Python 3. It’s just a table of contents at the moment, but the chapter on “Packaging Python libraries” has me very excited.

# 26th January 2009, 6:10 pm / python, python3, mark-pilgrim, diveintopython, packaging

google-mobwrite. Neil Fraser’s terrifyingly clever differential synchronization algorithm (for SubEthaEdit-style collaboration over the web) is now available as an open source Python and JavaScript library.

# 24th January 2009, 11:55 pm / mobwrite, google, open-source, python, javascript, collaboration, subethaedit, neil-fraser

EuroDjangoCon. 4th-6th of May 2009, in Prague. Talk submissions are open now, and registration starts on the 6th of February.

# 24th January 2009, 6:54 pm / eurodjangocon, django, djangocon, conferences, events, prague, python

New PylonsHQ Site Launches. The new site uses CouchDB instead of a relational database, and the code for the site is open source so you can see how it all works.

# 22nd January 2009, 6:33 pm / couchdb, pylons, python, ben-bangert, nonrelational

Train Crash Leads LA Times to Create Django Database on Deadline. A story from last September. I didn’t know the LA Times used Django. UPDATE: Yes I did, I introduced their panel about it at DjangoCon. Sorry, mind like a sieve sometimes.

# 21st January 2009, 5:19 pm / latimes, data-journalism, django, newspapers, python

What is django.contrib? I’d add that including a package in django.contrib is a promise that the core development team will ensure that package is updated to work with future versions of Django.

# 20th January 2009, 10:58 am / django, python, djangocontrib, jacob-kaplan-moss

Load Windows ICO files. Apparently PIL has trouble with the most recent versions of the windows .ico format (Vista now embeds PNG images in them)—this clever function deals with the differences and gives back a PIL Image object.

# 17th January 2009, 9:48 pm / pil, python, vista, windows, ico, images, png

Washington Post Update. Peter Harkins summarises the large number of Django-powered database journalism projects released by the Post since September 2007.

# 16th January 2009, 12:18 pm / peter-harkins, washington-post, django, python, data-journalism

Django now has fast tests. Changeset 9756 switched Django’s TestCase class to running tests inside a transaction and rolling back at the end (instead of doing a full dump and reload). “Ellington’s test suite, which was taking around 1.5-2 hours to run on Postgres, has been reduced to 10 minutes.”

# 16th January 2009, 11:40 am / django, testing, transactions, unittests, python, ellington, eric-holscher

Localbuilder. Gareth Rushgrove’s neat little Python continuous integration tool—it watches a directory for changes, then runs a command when it spots any.

# 14th January 2009, 10:57 pm / gareth-rushgrove, python, continuous-integration, localbuilder, testing

The History of Python (via) “A series of articles on the history of the Python programming language and its community”, being compiled by Guido plus guest authors.

# 14th January 2009, 9:42 am / guido-van-rossum, python, history, programming

The Django Book: Version 2.0 (via) Adrian’s working on a new edition of the Django Book updated to cover version 1.0. As with the first edition, it will be available free online in addition to a published Apress paperback. The first three chapters are now available.

# 9th January 2009, 2:54 pm / adrian-holovaty, django, book, python, apress

Rate limiting with memcached

On Monday, several high profile “celebrity” Twitter accounts started spouting nonsense, the victims of stolen passwords. Wired has the full story—someone ran a dictionary attack against a Twitter staff member, discovered their password and used Twitter’s admin tools to reset the passwords on the accounts they wanted to steal.

[... 910 words]

2008

Represent. Andrei Scheinkman and Derek Willis describe how they built the NYTimes Represent feature using GeoDjango and PostGIS.

# 29th December 2008, 10:10 pm / derek-willis, andrei-scheinkman, new-york-times, django, geodjango, python, postgresql, postgis, gis

pygooglechart. I tried a bunch of Python wrappers for Google Charts and liked this one best.

# 22nd December 2008, 11:43 am / python, google-charts

Represent and GeoDjango. The NYTimes new Represent application is built on GeoDjango.

# 20th December 2008, 9:07 pm / represent, new-york-times, geodjango, derek-willis, django, python

How to install lxml python module on mac os 10.5 (leopard). Instructions that work! Finally, I can find out what all the fuss is about.

# 15th December 2008, 12:05 am / lxml, python, osx, leopard, xml, libxml2

On packaging. James Bennett discusses the problems with setuptools (and ruby gems), and recommends Ian Bicking’s pip as a setuptools replacement.

# 14th December 2008, 4:57 pm / python, setuptools, pip, ian-bicking, james-bennett, ruby, gems

lxml: an underappreciated web scraping library. I just wish I could get the wretched thing to install on OS X Leopard without resorting to MacPorts.

# 11th December 2008, 9:54 am / lxml, macports, python, screen-scraping, ian-bicking

I don't think that Python 3.0 is a bad thing. But that it's displayed so prominently on the Python web site, without any kind of warning that it's not going to work with 99% of the Python code out there, scares the hell out of me. People are going to download and install 3.0 by default, and nothing's going to work. They're going to complain, and many are going to simply walk away.

Christopher Lenz

# 6th December 2008, 10 am / christopher-lenz, python, python3