Simon Willison’s Weblog

Subscribe
Atom feed for python Random

1,261 posts tagged “python”

The Python programming language.

2008

DjangoCon & Django 1.0 updates. DjangoCon tickets will be released in two batches of 100. The first set will be available at 12 noon UTC on Thursday July 31st; the second set will be released at 6pm UTC on Friday August 1st.

# 30th July 2008, 10:25 am / django, djangocon, events, python, tickets

Extra fields on many-to-many relationships (via) Checked in just over an hour ago, Django now lets you specify a custom “through” table for a ManyToManyField. Great work by Eric Florenzano.

# 29th July 2008, 1:58 pm / django, eric-florenzano, manytomany, python, through

FLOSS Weekly 34: Django. Randal Schwartz interviewed Jacob Kaplan-Moss at OSCON for the consistently excellent FLOSS Weekly podcast.

# 27th July 2008, 9:47 am / django, flossweekly, jacob-kaplan-moss, open-source, podcasts, python, randalschwartz

Dojango version 0.3 released. A reusable Django application that provides Dojo, helper functions (dojo.data integration) and tools for switching between Dojo versions.

# 24th July 2008, 12:47 am / django, dojango, dojo, javascript, python

Python BoF and Django Drinkup (via) At OSCON? Come along to the Jax Bar tonight (Tuesday 22nd) from 7pm to 10pm to hang out with fellow Pythoneers and Djangonaughts.

# 22nd July 2008, 6:48 pm / bof, django, oscon, python, social

Replacing Django’s Template Language With Jinja2. Part of Will Larson’s series on taking advantage of Django’s loose coupling.

# 22nd July 2008, 5:18 pm / django, jinja, loosecoupling, python, will-larson

Django 1.0 alpha release notes. The big features are newforms-admin, unicode everywhere, the queryset-refactor ORM improvements and auto-escaping in templates.

# 22nd July 2008, 6:04 am / alpha, autoescaping, django, django-admin, newformsadmin, orm, python, querysetrefactor, unicode

Django 1.0 alpha released! Not meant for production use, but a pretty solid preview of what’s coming in 1.0 proper. The beta is scheduled for August 5th.

# 22nd July 2008, 6:01 am / alpha, django, python

DjangoCon 2008. The official DjangoCon site is up, along with a mostly complete schedule.

# 20th July 2008, 8:49 pm / django, djangocon, python

Jinja2 Final aka Jinjavitus Released. The Jinja template engine now has auto-escaping as an optional feature, disabled by default. Worth considering as an almost drop-in replacement for Django’s template language if features such as macros and compilation to Python code appeal to you.

# 19th July 2008, 11:52 pm / autoescaping, django, jinja, python

Simple Top-Down Parsing in Python. Eye-opening tutorial on building a recursive descent parser for Python, in Python that uses top-down operator precedence.

# 19th July 2008, 11:37 pm / compilers, effbot, fredrik-lundh, parsing, python, recursivedescent

DjangoCon 2008. Venue: Gooleplex, San Francisco Bay Area. Dates: 6th and 7th Sept. Official post will be on djangoproject.com soon.

Robert Lofthouse

# 13th July 2008, 4:50 pm / django, djangocon, events, google, googleplex, python, robert-lofthouse, san-francisco

ftputil. Python’s built-in ftplib is ridiculously low level, requiring you to send RETR commands and even assemble downloaded chunks yourself using a callback. ftputil looks like a really solid high-level interface to that module with file-like objects and plenty of convenient methods.

# 9th July 2008, 10:51 am / ftp, ftplib, ftputil, python

Protocol Buffers: Google’s Data Interchange Format. Open sourced today. Highly efficient binary protocol for storing and transmitting structured data between C++, Java and Python. Uses a .proto file describing the data structure which is compiled to classes in those languages for serializing and deserializing. 3-10 times smaller and 20-100 times faster than XML.

# 8th July 2008, 8:20 am / c-plus-plus, google, idf, java, open-source, protocolbuffers, python, xml

Django Unit Tests and Transactions. If you’re using a transactional database engine (MySQL with InnoDB, Postgres or SQLite) you can speed things up by running each of your unit tests inside a transaction and rolling back in tearDown().

# 7th July 2008, 2:14 pm / django, innodb, mysql, postgresql, python, sqlite, testing, transactions

OSM routing, A*, cycle-filtered, python (via) A python library for finding routes using OpenStreetMap data.

# 5th July 2008, 3:13 pm / mapping, openstreetmap, osm, python, routing

Running C and Python Code on The Web. Adobe are working on a toolchain to compile C code to target the Tamarin VM in Flash. This will allow existing C code (from CPython to Quake) to execute in a safe sandbox in the browser.

# 4th July 2008, 8:26 am / adobe, browser, c, flash, python, quake, tamarin

Whitespace Sensitivity. Amusingly, Ruby is actually far more sensitive about whitespace than Python is.

# 1st July 2008, 2:50 pm / armin-ronacher, python, ruby, whitespace

Graphite. Real-time graphing package for server monitoring, similar to RRDTool. Created by the team at Orbitz, using Django and ExtJS for the frontend and Cairo to generate the graphs.

# 28th June 2008, 11:53 pm / cairo, django, extjs, graphing, graphite, monitoring, orbitz, python, rrdtool

How-to: Full-text search in Google App Engine. Use search.SearchableModel instead of db.Model—it’s pretty rough at the moment which is probably why it’s still undocumented.

# 27th June 2008, 8:25 am / full-text-search, google-app-engine, python, search

CookBookNewFormsFieldOrdering. Handy tip—change the order of fields in a Django newforms instance by over-riding form.fields.keyOrder (since fields is a SortedDict).

# 27th June 2008, 1:02 am / django, newforms, python, tip

Django snippets: Command to dump data as a python script. Extremely useful—dumps the data for an application as an executable Python script which will re-import it in to another database without any risk of colliding with existing IDs, sorting out foreign keys along the way.

# 24th June 2008, 12:07 pm / django, django-snippets, import, python

The basics of creating a tumblelog with Django (via) Ryan Berg suggests having a StreamItem model that links uses a GenericForeignKey to link to other content types, then using signals to cause a StreamItem to be created for every other model type. I should switch to doing that on this blog: at the moment I have to query three separate tables to build the tumblelog part which results in messy code for ordering and pagination.

# 24th June 2008, 11:09 am / contenttypes, django, genericforeignkey, python, ryan-berg, tumblelog

Tailor. “Tailor is a tool to migrate or replicate changesets between ArX, Bazaar, Bazaar-NG, CVS, Codeville, Darcs, Git, Mercurial, Monotone, Subversion and Tla repositories.”—written in Python.

# 24th June 2008, 9:59 am / bazaar, codeville, cvs, darcs, dvcs, git, mercurial, monotone, python, subversion, tailor, tla, version-control

jsontime. Nat and I threw this together this morning—it runs on Google App Engine and exposes Python’s pytz timezone library over JSONP.

# 21st June 2008, 7:07 pm / api, google-app-engine, javascript, json, jsontime, projects, python, pytz

PortingDjangoTo3k. Martin von Loewis has started assembling a patch. His write-up illustrates some key differences between Python 2.X and Python 3—it looks like Django’s unicode handling is going to require the most work.

# 19th June 2008, 5:53 pm / django, martin-von-loewis, python, python3k, unicode

Reddit release their codebase. Under the same Common Public Attribution License used by Facebook for their recent source release.

# 18th June 2008, 2:32 pm / cpal, open-source, python, reddit

New foundation for Django. Django now has its own nonprofit software foundation (courtesy of a bunch of tough paperwork by Jacob Kaplan-Moss), and fittingly the Lawrence-Journal World get the exclusive.

# 17th June 2008, 5:16 pm / django, jacob-kaplan-moss, ljworld, python, dsf

Spicing Up Embedded JavaScript. John Resig collects the various ways in which a JavaScript interpreter can be hosted by Python, PHP, Perl, Ruby and Java. There are full JS implementations in PHP, Perl and Java; Ruby and Python both have modules that use an embedded SpiderMonkey.

# 15th June 2008, 11:32 am / embedding, java, javascript, john-resig, perl, php, python, ruby, spidermonkey