1,085 items tagged “python”
The Python programming language.
2007
Updates to template_utils. James Bennett’s Django template_utils library now provides tags for consuming external RSS and Atom feeds. Combine with template fragment caching for an instant mashup written just using templates.
Django snippets: Authenticate against Active Directory. Uses a custom authentication backend with the Python ldap module. If Django hasn’t seen the user before a new Django user account is created with data from ldap.
Django Basic Apps. Nathan Borror has released a suite of simple, reusable Django applications: Basic Blog, Basic Places, Basic People, Basic Library and Basic Profiles.
xkcd: Python. Just type “import antigravity”.
Datejs—A JavaScript Date Library. Building a date API around chaining—Date.today().next().thursday()—is a neat concept. I’d like to see that adapted for Python’s datetime library.
If you only remember one thing about handling non-HTML output via Django: know that you can use the HttpResponse object as if it were a file. Writing to such an object and returning it will give you the output you wrote. It's a very simple concept, but one that translates well to third-party libraries.
First Notes on Django. Cool, the IETF are developing internal tools with Django.
Oxford Geek Night 4. Tomorrow night, usual venue. Topics include mySociety, Pylons, MythTV and more.
sorl-thumbnail. This looks like a decent attempt at a generic Django thumbnailing service, but I’m always wary of code that allows URL hackers to create large numbers of files that will be cached to disk. UPDATE: My mistake, thumbnail creation can only be caused by template authors.
Using django.newforms with Pylons. It’s always good to see Django components used outside of the framework itself. For the record, you can avoid the DJANGO_SETTINGS_MODULE environment variable entirely using django.conf.settings.configure (search for it).
Eventlet—Second Life Wiki. Seriously powerful non-blocking IO library for Python, currently maintained by Linden Lab as part of the server architecture used for Second Life.
Newforms, part 1. James Bennett provides a detailed description of Django’s newforms (not so new now though, they’ve been around for over a year), complete with attractive diagrams.
Mock—Mocking and Test Utilities (via) New mocking library for Python based on the “action ... assertion” pattern (as opposed to the more common “record ... replay”).
Professional Python Frameworks: Web 2.0 Programming with Django and Turbogears. Apparently published by Wrox in October 2007, beating the “official” Django book by just over a month. Has anyone seen this on bookshelves yet?
Django Changeset 6671. Malcolm Tredinnick: “Implemented auto-escaping of variable output in templates”. Fantastic—Django now has protection against accidental XSS holes, turned on by default.
Django Book Update. It’s done! Went to the printer on Friday, due in bookstores in the second week of December (just in time for Christmas). Congrats to Adrian and Jacob.
Reinteract—Better interactive Python. Really neat Mathematica-style pygtk interactive prompt for Python, where previous lines can be edited in place and graphs and other graphical primitives can be displayed inline. Includes an elegant plugin mechanism.
Orbited: The Orbit Event Daemon. HTTP daemon designed for long-lasting comet connections, written in Python using pyevent on top of libevent.
Django documentation bookmarklets. James Bennett continues his month-long series of daily Django tutorials with documentation for one of Django’s best kept secrets: application introspection HTTP headers and bookmarklets that make use of them.
Hello Revver.com 2.0. Revver, one of the more established video startups, have launched their new version which is powered by Django.
PyObjC 2.0 changes (via) All the good stuff that’s in PyObjC 2.0, released as part of Leopard. According to bbum this is the most significant release of PyObjC in 7 years.
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.