Simon Willison’s Weblog

Subscribe
Atom feed for python

1,085 items tagged “python”

The Python programming language.

2008

RFC: Django 1.0 roadmap and timeline. Jacob’s proposed target is “early September” for the final 1.0 release.

# 12th June 2008, 10:34 am / django, python, jacob-kaplan-moss

Shortcutting render_to_response. I tend to use a simple wrapper function, but the other options described here are worth exploring. This is why I’m so keen on Django’s “take a request object, return a response object” philosophy—it makes it trivial to extend the framework in the direction you want.

# 10th June 2008, 11:49 am / django, request, response, python

Python + Hadoop = Flying Circus Elephant. Last.fm have released Dumbo, a Python module that lets you easily write Hadoop map/reduce tasks using Python and generators.

# 31st May 2008, 2:14 pm / hadoop, python, generators, lastfm, dumbo, mapreduce

modswgi: Debugging Techniques. mod_wsgi is excellent software, and the documentation is equally superb. I used these instructions recently to run the Python debugger inside a running instance of Apache, which helped my track down some import errors that weren’t occurring with Django’s development server.

# 25th May 2008, 1:34 pm / modwsgi, django, python, debugging, pdb

AOP aspect of JavaScript with Dojo. Fantastic post—concisely explains Aspect Oriented Programming, then shows how Dojo’s dojox.lang.aspect brings AOP to JavaScript, including some really useful built-in aspects for logging, profiling and more. Aspects are like Python decorators on steroids.

# 18th May 2008, 10:45 am / aspects, aop, javascript, decorators, python, dojo, dojox, eugenelazutkin

Using Git as a versioned data store in Python. gitshelve supports the same interface as Python’s built-in shelve module but stores things to a versioned Git repository instead of just a pickled dictionary. I’ve been casually wondering what a Git-powered CMS would look like.

# 15th May 2008, 3:25 pm / git, cms, gitshelve, python

Python with a modular IDE (Vim). Great tips—I’d use these if I wasn’t still scarred from the time vim encrypted my file instead of saving it because I had caps lock on by mistake.

# 12th May 2008, 7:09 am / capslock, vim, python, ide

Byteflow Blog Engine. This looks like the most full-featured of the Django blog engines by a pretty big margin, including OpenID client and server support. A product of the growing Russian/Ukrainian Django community.

# 11th May 2008, 7:41 pm / openid, byteflow, django, python, russia

What amazes me is how close Ruby 1.9 bytecode and Python 2.5 bytecode are. Some things translate almost directly. [...] And, really, if that's true (and I vouch that it is truly, truly true,) then how are Python and Ruby still on separate runtimes?

Why the lucky stiff

# 5th May 2008, 10:14 pm / python, ruby, whytheluckystiff

Sneaking Ruby Through Google App Engine (and Other Strictly Python Places). In a characteristic stroke of genius, _why makes a solid initial attempt at compiling Ruby 1.9 source to Python 2.5 bytecode.

# 5th May 2008, 10:13 pm / bytecode, ruby, python, whytheluckystiff, googleappengine

Django Users Group London meetup, 19th of May. The inaugural meeting of DJUGL will be on the 19th of May at the Capital Radio building in Leicester Square, sponsored by GCap Media. Three presentations starting at 7pm (I’ll be giving one of them), then on to the pub. Sign up on EventWax; there are only 70 places.

# 2nd May 2008, 12:19 pm / django, python, london, djugl, gcap, gcapmedia, events

jQuery style chaining with the Django ORM

Django’s ORM is, in my opinion, the unsung gem of the framework. For the subset of SQL that’s used in most web applications it’s very hard to beat. It’s a beautiful piece of API design, and I tip my hat to the people who designed and built it.

[... 820 words]

QuerysetRefactorBranch. What’s new and changed now that queryset-refactor has merged to trunk.

# 27th April 2008, 7:34 am / querysetrefactor, django, python

Queryset-refactor branch has been merged into trunk. Malcolm’s latest Django masterpiece is complete.

# 27th April 2008, 7:21 am / django, malcolmtredinnick, qsrf, orm, branch, python

Multi-Inflection-Point Alert. Dammit, Tim, stop giving away our competitive advantages!

# 26th April 2008, 6:48 pm / tim-bray, couchdb, simpledb, bigtable, rest, soap, python, java, rails

Python one-liner of the day. I love the idea of publishing one-liners accompanied by one-line test suites.

# 26th April 2008, 10:24 am / testing, python

Generator Tricks for Systems Programmers. The best tutorial on Python’s powerful generator feature I’ve seen anywhere.

# 24th April 2008, 10:17 am / generators, python, david-beazley

Multiple inheritance of newforms and modelforms. If you ever see “Error when calling the metaclass bases metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases” when trying multiple inheritance with newforms and modelforms, here’s a scary solution I found.

# 12th April 2008, 12:54 pm / django, python, multipleinheritance, metaclasses, inheritance, newforms, modelforms

Active on IRC in the past hour. New Django People feature in collaboration with Brian Rosner—DjangoBot now provides information on currently active IRC participants. There’s an opt-out privacy control and the bot sends you a message about it the first time it logs your activity.

# 12th April 2008, 12:58 am / django-people, django, python, irc

Google App Engine for developers. Best in-depth coverage so far, from Niall Kennedy. I didn’t know that Guido had worked on the Django compatibility layer.

# 10th April 2008, 11:14 pm / niallkennedy, guido-van-rossum, python, django, googleappengine

The Google App Engine model class, db.Model, is not the same as the model class used by Django. As a result, you cannot directly use the Django forms framework with Google App Engine. However, Google App Engine includes a module, db.djangoforms, which casts between the datastore models used with Google App Engine and the Django models specification. In most cases, you can use db.djangoforms.ModelForm in the same manner as the Django framework.

Google App Engine docs

# 8th April 2008, 1:48 pm / django, google, python, newforms, modelforms, googleappengine

Running Django on Google App Engine. Django 0.96 is included, but you need to disable the ORM related parts and use the Google App Engine Bigtable interface instead.

# 8th April 2008, 1:15 pm / django, python, google, googleappengine

Google App Engine. Write applications in Python using a WSGI compatible application framework, then host them on Google’s highly scalable infrastructure. The most exciting part is probably the Datastore API, which provides external developers with access to Bigtable for the first time.

# 8th April 2008, 7:25 am / googleappengine, python, bigtable, google, scaling, virtualisation, wsgi

Why the webstandards world appears to be choosing Django. I’m not convinced that this is a definite trend, but it certainly makes for an interesting discussion.

# 4th April 2008, 8:33 am / django, web-standards, gareth-rushgrove, python

Python-by-example. “This guide aims to show examples of use of all Python Library Reference functions, methods and classes”, thus addressing my number one complaint about Python’s standard library documentation.

# 2nd April 2008, 3:42 pm / python, documentation, stdlib

Django Development with Djblets. The Review Board team have extracted a library of useful Django utilities from their application. The first to be documented are helpers for reducing boilerplate in custom template tags.

# 31st March 2008, 1:19 pm / templatetags, django, python, reviewboard, djblets

Graphication. Andrew Godwin’s Python graphing library, based on Cairo. Responsible for the very handsome graphs on The Carbon Account.

# 30th March 2008, 7:05 pm / andrew-godwin, graphication, graphing, python, thecarbonaccount, cairo

Exposing calendar events using iCalendar in Django. A simple abstraction around the vobject Python library.

# 30th March 2008, 6:31 pm / django, vobject, python, icalendar

xPyUnit: Uniting in Python with XML reporting. Should be just the ticket for integrating Django’s testing framework with Cruise Control.

# 27th March 2008, 12:35 pm / cruisecontrol, testing, pyunit, xpyunit, python, django

Setup mod_wsgi for Django and Shared Hosting. Tutorial by David Cramer; attached are useful comments from mod_wsgi author Graham Dumpleton.

# 26th March 2008, 2:42 pm / modwsgi, wsgi, hosting, django, python, david-cramer, grahamdumpleton