Simon Willison’s Weblog

Subscribe
Atom feed for python

1,070 items tagged “python”

The Python programming language.

2009

pudb. A full-screen, curses console based visual debugger for Python, built using the urwid console UI library.

# 1st November 2009, 12:09 pm / python, pdb, debugger, urwid, ui, console, pudb

Django 1.2 planned features. The votes are in and the plan for Django 1.2 has taken shape - features are split in to high, medium and low priority. There's some really exciting stuff in there - outside of the things I've already talked about, I'm particularly excited about multidb, Model.objects.raw(SQL), the smarter {% if %} tag and class-based generic views.

# 26th October 2009, 10:38 am / django, multidb, python, classbasedviews, orm

Twisted inlineCallbacks and deferredGenerator. inlineCallbacks are a brilliant (but seemingly under-promoted) feature of Twisted which use the ability to return a value from a yield statement to make asynchronous callbacks look much more like regular sequential programming.

# 25th October 2009, 11:30 pm / python, twisted, async, callbacks, generators, yield

Why I like Redis

I’ve been getting a lot of useful work done with Redis recently.

[... 900 words]

Introducing Cloudera Desktop. It’s a GUI for Hadoop, and under the hood is a whole stack of open source software, including Python, Django, MooTools, Twisted, lxml, CherryPy, Mako, Java and AspectJ.

# 21st October 2009, 6:48 pm / hadoop, open-source, cloudera, python, django, mootools, twisted, lxml, cherrypy, mako, java, aspectj

Django security updates released. A potential denial of service vulnerability has been discovered in the regular expressions used by Django form library’s EmailField and URLField—a malicious input could trigger a pathological performance. Patches (and patched releases) for Django 1.1 and Django 1.0 have been published.

# 10th October 2009, 12:24 am / django, security, python, regular-expressions

MichaelMoore.com in Django. A seriously impressive case study—a complete rebuild from the ground up completed in just five weeks using Django, Solr and Haystack for a high traffic site with a top 10,000 US Alexa ranking.

# 9th October 2009, 12:38 am / python, michael-moore, django, scaling

Twisted Web in 60 seconds. A common complaint about Twisted is how hard it is to figure out the web stack. Jp Calderon’s tutorial (in nine installments and counting) is the best documentation on web development in Twisted I’ve seen.

# 8th October 2009, 11:48 am / twisted, jpcalderon, python

Python is Unix. Jacob ports Ryan Tomayko’s simple prefork network server to Python.

# 7th October 2009, 11:43 am / python, jacob-kaplan-moss, ryan-tomayko, unix

History of Django’s popularity. “What sequence of events made Django the most popular Python web framework?”—insightful answers from Alex Martelli and James Bennett.

# 4th October 2009, 10:29 am / django, python, history, alex-martelli, james-bennett

MySQL Connector/Python. A pure Python implementation of the MySQL client/server protocol, meaning you can talk to a MySQL server from Python without needing to first install the MySQL client libraries (which often requires compiling from source).

# 2nd October 2009, 2:16 pm / mysql, python, databases, django

TypePad Motion. Launched today at FOWA, Motion is a microblogging application written in Django that uses the TypePad API for all persistent storage—which means you can deploy it as server-side code on your own site, but scaling horizontally is handled by TypePad (you just need to scale out the state-free front end).

# 1st October 2009, 3:51 pm / django, python, sixapart, motion, typepad, fowa

Python Logging 101. A really useful introduction to Python’s logging module by that module’s author, Vinay Sajip.

# 29th September 2009, 6:40 pm / python, logging, vinaysajip

Django ponies: Proposals for Django 1.2

I’ve decided to step up my involvement in Django development in the run-up to Django 1.2, so I’m currently going through several years worth of accumulated pony requests figuring out which ones are worth advocating for. I’m also ensuring I have the code to back them up—my innocent AutoEscaping proposal a few years ago resulted in an enormous amount of work by Malcolm and I don’t think he’d appreciate a repeat performance.

[... 1,674 words]

MySQL, Python and MacOS X 10.6 (Snow Leopard). I gave up on compiling things when I upgraded to Snow Leopard—I’m back to running Ubuntu in a VMWare instance, mounted over Samba so I can still use TextMate.

# 25th September 2009, 10:14 pm / ubuntu, vmware, snowleopard, samba, textmate, python, mysql, osx

Diesel. Yet Another Asynchronous Python Comet Library, of interest because this is the first one I’ve seen that uses Python’s generator coroutines, taking advantage of the return value of the yield statement to feed messages in to a generator function. Currently only works on Python 2.6 on Linux due to a dependency on 2.6’s epoll support.

# 23rd September 2009, 5:15 pm / generators, diesel, comet, async, python

Fabric factory. Promising looking continuous integration server written in Django, which uses Fabric scripts to define actions.

# 21st September 2009, 6:35 pm / django, fabric, python, continuous-integration, testing, fabricfactory

Tornado Web Server (via) An extremely exciting addition to the Python web landscape, Tornado is the open sourced version of FriendFeed’s custom web stack. It’s a non-blocking (epoll) Python web server designed for handling thousands of simultaneous connections, perfect for building Comet applications. The web framework is cosmetically similar to web.py or App Engine’s webapp but has decorators for writing asynchronous request handlers. The template language uses Django-style syntax but allows you to use full Python expressions. FriendFeed have benchmarked it handling 8,000 requests a second running as four load-balanced processes on a 4 core server.

# 10th September 2009, 9:32 pm / friendfeed, tornado, python, comet, webpy, webapp, appengine, django, epoll, bret-taylor

Why Python Pickle is Insecure. Because pickle is essentially a stack-based interpreter, so you can put os.system on the stack and use it to execute arbitrary commands.

# 9th September 2009, 11:04 pm / python, pickle, security

Debugging Django in Production Revisited. Eric Holscher expands his show-technical-errors-to-superusers middleware to only show them to users in the group named “Technical Errors”.

# 7th September 2009, 5:21 am / django, debugging, python, middleware, eric-holscher

svnpubsub.py (via) A Twisted/Python powered comet API for pushing out Subversion commits, built for Apache Foundation projects.

# 6th September 2009, 9:50 pm / twisted, python, subversion, svnpubsub, comet

And so it goes, around again. Charles Miller on Java, pointing out that if you don’t have closures and first-class functions you end up having to add band-aid solutions and special case syntactic sugar. Python’s lack of multi-line lambdas leads to a similar (though less pronounced) effect.

# 3rd September 2009, 9:46 am / java, python, charles-miller, programming-languages

Exploring OAuth-Protected APIs. One of the downsides of OAuth is that it makes debugging APIs in your browser much harder. Seth Fitzsimmons’ oauth-proxy solves this by running a Twisted-powered proxy on your local machine which OAuth-signs every request going through it using your consumer key, secret and tokens for that API. Using it with a browsers risks exposing your key and token (but not secret) to sites you accidentally browse to—it would be useful if you could pass a whitelist of API domains as a command line option to the proxy.

# 23rd August 2009, 11:06 am / oauth, apis, proxy, sethfitzsimmons, twisted, python

easy_install no longer working with SourceForge-hosted projects? Unsurprising, since installation software (which is often run as root) that crawls the web and scrapes HTML pages for download links is a horrible, horrible idea.

# 19th August 2009, 11:38 am / easyinstall, python, sourceforge

Kung Fu People (via) The first site to launch based on the open source Django code from djangopeople.net!

# 19th August 2009, 11:37 am / kungfu, django-people, open-source, django, python, peter-bengtsson

How do you install lxml on OS X Leopard without using MacPorts or Fink? I’ve asked on Stack Overflow... hope I get a good answer.

# 14th August 2009, 1:04 pm / python, leopard, lxml, stackoverflow, osx

Python logging from multiple processes. Use Python’s socket log handler to send all log messages to a single server—the python-loggingserver project implements such a server as a Twisted application with a handy web interface for viewing the aggregated logs.

# 13th August 2009, 11:55 pm / python, logging, twisted

Scriptlets—Quick web scripts (via) From the prolific Jeff Lindsay, a pastebin-style tool for short server-side scripts written in Python, JavaScript or PHP that executes them within a Google App Engine powered sandbox. The Java code that implements the service is available on GitHub.

# 13th August 2009, 1:51 pm / github, jeff-lindsay, webhooks, scriptlets, python, javascript, php, googleappengine, appengine, open-source, java

minixsv (via) As far as I can tell, this is the only library that can validate XML using pure Python (no C extension required). I’d be extremely happy if someone would write a pure Python library (or one that only depends on ElementTree, which is included in the standard library) for validating XML against a Relax NG Compact syntax schema. Even DTD validation would be better than nothing!

# 12th August 2009, 4:59 pm / relaxng, elementtree, minixsv, python, validation, xml, xmlschema

topia.termextract. Impressive Python term extraction library (similar to the various term extraction web APIs but you can run it on your own hardware), incorporating a Parts-Of-Speech tagging algorithm.

# 10th August 2009, 9:26 pm / python, topia, termextraction, nlp