1,146 posts tagged “python”
The Python programming language.
2007
Python on Leopard. readline is finally bundled, so the interactive interpreter works correctly without hunting around for frustratingly elusive add-ons. easy_install is bundled as well.
Django security fix released. Django’s internationalisation system has a denial of service hole in it; you’re vulnerable if you are using the i18n middleware. Fixes have been made available for trunk, 0.96, 0.95 and 0.91.
Using the extra() QuerySet modifier in Django for WeGoEat. You can use select() on a QuerySet to obtain extra values using subqueries.
EventScripts 2.0, now with Python. EventScripts is a plugin that lets you write scripts to customise dedicated servers for Valve’s Source engine games (Half-Life 2, Counter-Strike, Team Fortress 2 and the like). Version 2.0 adds support for Python 2.5 as an embedded scripting language.
Django may be built for the Web, but CouchDB is built of the Web. I've never seen software that so completely embraces the philosophies behind HTTP. CouchDB makes Django look old-school in the same way that Django makes ASP look outdated.
LastGraph. Now Available. Andrew Godwin has relaunched his LastGraph Last.fm graphing application. The new version is built on Django and S3 and uses Andrew’s Graphication graphing library based on Cairo.
/trunk/jl/scraper. journa-list.com is open source, and the screen scrapers are written in Python.
nose 0.10.0 final! Nose is my favourite Python testing tool: it can auto-discover and execute tests in a directory hierarchy, which makes it easy to run just a sub-set of your test suite.
Two months with Ruby on Rails. Good rant—covers both the good and the bad. The first complaint is the lack of XSS protection by default in the template language. Django has the same problem, but the solution was 90% there when I saw Malcolm at OSCON.
Writing An Hadoop MapReduce Program In Python. Hadoop (the open source map/reduce framework) can interact with any program that reads from stdin and outputs on stdout—so it’s trivial to drop in Python scripts for the map and reduce steps.
tranquil. Inspired take on the Django ORM to SQLAlchemy problem: lets you define your models with the Django ORM but use SQLAlchemy to run queries against them.
String types in Python 3. bytes are now immutable (just like the bytestrings they are replacing) and a new mutable buffer type has been introduced.
Some Notes on Tim Bray’s Wide Finder Benchmark. Fredrik Lundh demonstrates some Python ninja techniques for parsing log files using multiple cores (and eventually memory mapping).
DbMigration—a schema migration tool for Django. Nice and simple tool for adding schema migrations to a Django application.
lxml.cssselect (via) lxml includes an implementation of CSS 3 selectors, which compiles them to XPath expressions. Should be a useful tool for parsing Microformats from Python.
Hello JS-CTYPES, Goodbye Binary Components. Mark Finkle is porting Python’s ctypes functionality to the Mozilla platform, to allow binary XPCOM components to be defined in pure JavaScript.
The Rubinius Sprint. Sun are throwing a ton of resources at Ruby, because as Tim Bray says, “it’s not fast enough”. Imagine where they’d be if they’d invested this kind of support in Jython five years ago...
virtualenv 0.8.1. Ian Bicking’s tool for creating isolated Python environments; designed to replace his earlier workingenv package. Does anyone have any experience using this? It looks fantastically useful.
Zope3 for Djangoers. I prefer “Djangonauts”, personally. Useful overview of Zope 3 for people with Django experience (first of a multi-part series).
Restructured Text to Anything. Slick set of online tools for converting Restructured Text (one of the more mature wiki-style markup languages) to HTML or PDF. Includes a nice looking API. Powered by Django.
Building the Social Web with OpenID. Slides from my keynote at yesterday’s PyCon UK.
django-sphinx (via) More code from Curse Gaming; this time a really nice API for adding Sphinx full-text search to a Django model.
wikimarkup (via) “MediaWiki markup in Python”. I’ve always suspected that MediaWiki was like Perl; the only thing that can parse MediaWiki is MediaWiki. Not sure how faithful this Python port is but I’d love my theory to be proved wrong.
Advanced Django. Slides from my hour long tutorial at PyCon UK this morning. Most of the material was adapted from OSCON, but I also added a new section covering newforms.
Django on Jython: What I’ve done until now. It’s not quite there yet (the new Jython is Python 2.2 with a few 2.3 features; Django requires 2.3 at least) but it’s looking pretty promising.
Amazon EC2 Basics For Python Programmers. Detailed introduction and tutorial from James Gardner.
calendar.timegm() (via) An “unrelated but handy function” that converts a time.gmtime() in to a corresponding Unix timestamp. I’ve been hand-rolling this one for years; never thought to look in calendar.
Sam Ruby: 2to3. Sam’s report on an attempt to port the Universal Feed Parser to Python 3.0. The 2to3 tool does most of the work, but it seems the unicode changes can be pretty tricky.
Django vs feedparser on dates. Some useful tips in the comments. I find Python’s timezone stuff endlessly frustrating: I know it can do what I want, but it always takes me a ridiculously long time to figure out the necessary incantations.
What’s New in Python 3.0. They’re definitely taking advantage of the break in backwards compatibility—lots of niggling inconsistencies are finally being cleaned up.