255 items tagged “python”
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
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
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
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
Queryset-refactor branch has been merged into trunk. Malcolm’s latest Django masterpiece is complete.
27th April 2008, 7:21 am
Multi-Inflection-Point Alert. Dammit, Tim, stop giving away our competitive advantages!
26th April 2008, 6:48 pm
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
Generator Tricks for Systems Programmers. The best tutorial on Python’s powerful generator feature I’ve seen anywhere.
24th April 2008, 10:17 am
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
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
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
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
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
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
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
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
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
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
Exposing calendar events using iCalendar in Django. A simple abstraction around the vobject Python library.
30th March 2008, 6:31 pm
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
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
Djangofriendly (via) Ryan Berg’s attractive new site collecting ratings and reviews for web hosts that support Django. I’m still happily hosted on a bytemark VPS, which isn’t currently listed on the site.
26th March 2008, 8:47 am
Better Use of Newforms. Two really neat techniques: using an inclusion tag template to DRY your custom form templates, and adding what-to-do-next methods to the form class itself to cut down on the application code in your views.
25th March 2008, 10:53 pm
fireeagle_api.py. Steve Marshall’s Fire Eagle python binding on GitHub.
22nd March 2008, 11:57 pm
PownceFS. Not a joke: it’s a Fuse filesystem (written in Python, using OAuth for authentication) which exposes a directory for each of your friends on Pownce containing the files that they have uploaded.
22nd March 2008, 11:18 pm
views.py for wikinear.com (via) I’ve published the views.py file from wikinear.com as an example of simple Fire Eagle integration with a Django application.
22nd March 2008, 7:23 pm
Monkeypatching is Destroying Ruby (via) Deliberately provocative title, but makes a well considered case for restrained use of monkey patching in Ruby. Cultural norms around monkey patching seem to me to be one of the core differences between the Ruby and Python communities.
22nd March 2008, 12:27 am
Version 2.0 of mod_wsgi is now available. Includes features that should make Python (and Django) on shared hosting much easier: a non-root user can touch their WSGI script file to restart just their application’s daemon processes when they make changes and Python virtual environments are supported to allow different versions of packages without interference.
21st March 2008, 1:23 pm
mysql_cluster (via) My Russian isn’t all that good, but this looks like a neat way of getting Django to talk to a master/slave setup, written by Ivan Sagalaev. UPDATE: English docs are linked from the comments.
21st March 2008, 8:45 am
A Toy Chat Server with Eventlet and Mulib (via) Eventlet (the Python non-blocking IO library originally written for Second Life) is ideally suited to building Comet servers; Chuck Thier demonstrates a simple chat server in a small amount of code.
21st March 2008, 3:28 am
Simple Exception Response for AJAX debugging. Neat solution to the problem of Django error pages showing up as raw HTML in the Firebug Ajax log.
19th March 2008, 4:44 pm
IronPython, MS SQL, and PEP 249. How Dino Viehland got Django’s ORM to talk to the .NET database layer.
19th March 2008, 9:46 am
Queryset Implementation. Malcolm explains the work that has gone in to the queryset-refactor branch. Executive summary: Python’s ORM is probably a lot better at SQL than you are.
19th March 2008, 9:43 am
Integrating reCAPTCHA with Django. Looks pretty straight forward.
19th March 2008, 9:41 am
Django on IronPython. Dino Viehland demonstrated Django running on IronPython and SQL Server at PyCon.
17th March 2008, 4:05 pm
Hacking Contributed Models. Neat Django trick using monkeypatching to make some minor tweaks to built-in contributed models such as auth or flatpages.
11th March 2008, 5:51 am
python4ply tutorial. python4ply is a parser for Python written in Python using the PLY toolkit, which compiles to Python bytecode using the built-in compiler module. The tutorial shows how to use it to add support for Perl-style 1_000_000 readable numbers.
11th March 2008, 5:49 am
Windows Live ID Delegated Authentication. Would make life a lot simpler if they just supported OAuth, but at least they include sample code in Python, Ruby and PHP.
8th March 2008, 3:19 pm
In-Depth django-sphinx Tutorial. Another neat Django extension from the guys at Curse: easy integration with the sphinx full text search engine.
5th March 2008, 12:03 am
Jython’s Future Looking Sunny. Sun have (finally) invested in Jython, hiring lead maintainer Frank Wierzbicki. They’ve also hired Ted Leung to “represent the wider world of Python at Sun”. Great news.
3rd March 2008, 4:08 pm
queryset-refactor changeset 7126. Malcolm just checked model inheritance in to the queryset-refactor branch, with full documentation and unit tests. People have been requesting this for ages.
18th February 2008, 9:46 am
Mono Beta Launch—Official Linden Blog. The Mono VM is now in public beta testing running LSL scripts in Second Life. The first step on the road to IronPython support?
30th January 2008, 2:19 am
Python Web Framework on the JVM. An update on both Jython and the Django on Jython project—it looks like Jython 2.5 isn’t that far away.
30th January 2008, 2:06 am
Monkeypatching idioms—elegant or ugly? Guido offers a decorator and a metaclass as syntactic sugar for monkeypatching existing Python classes.
30th January 2008, 12:39 am
Linkherd—django. Linkherd is a Django-powered startup that offers sub-reddit style functionality. I’ve set up a Django site there as well.
26th January 2008, 11:58 pm
Django sub-reddit. Reddit are trialling the ability to create custom sub-reddits, so I put one up for Django links and discussions.
26th January 2008, 11:56 pm
Community sites on Django People. Small new feature: I can now add community sites to individual country pages. If you know of any regional community sites that I’ve missed, let me know in a comment or by e-mail.
25th January 2008, 12:40 am
Django People: OpenID and microformats
In hindsight, it was a mistake to launch Django People without support for OpenID. It was on the original feature list, but in the end I decided to cut any feature that wasn’t completely essential in order to get the site launched before it drowned in an ocean of “wouldn’t-it-be-cool-ifs”. [... 626 words]
Django People: Colophon. I’ve added a colophon to Django People, something I try to do for all of my personal projects.
23rd January 2008, 4:58 pm
Caching Layer for Django ORM. Interesting extension to Django’s ORM that adds automatic caching of queysets and smart cache invalidation.
23rd January 2008, 3:18 pm
World’s ugliest Django app. Brilliant hack from Paul Bissex: a self-contained Django application in 70 lines of code which shows off some internals trickery and makes use of a bunch of handy django.contrib packages.
22nd January 2008, 1:34 am
Django at PyCon. Unfortunately I’ll be missing US PyCon this year (I’ll be at SxSW and Webstock in New Zealand though)—but it’s great to see that there’s a strong line-up of Django related presentations.
21st January 2008, 9:54 pm
django-evserver. Marek Majkowski got Comet working with Django using a custom WSGI server that wraps libevent using ctypes.
19th January 2008, 12:15 pm
Django Developer Jobs. Just an observation: the Django job market is booming at the moment, with 16 new job ads posted so far this year (that’s nearly one a day). If you want to be paid money to develop in Django there’s never been a better time.
18th January 2008, 3:51 pm
Django snippets: “for” template tag with support for “else” if array is empty. A neat solution to a common pattern; I’d personally like to see this included in Django proper.
16th January 2008, 9:42 pm
A little something I’ve been working on. Paul Bissex has been working on a Django book with Jeff Forcier and Wesley Chun, to be published by Prentice Hall. It sounds like they’re a good way along the process.
14th January 2008, 10:47 pm
pysolr. Python wrapper for Solr, the search web service wrapper for Lucene. One thing I’m not clear on: do you need to configure Solr with the fields you’ll be indexing in advance, or can Solr create new fields on the fly to match the data you send it?
9th January 2008, 8:50 pm
Good architectural layering, and Bzr 1.1. Mark Shuttleworth on the growing importance of plug-in architectures as an open source project evolves, as they allow new developers to release their own components without needing commit access to the project. Django is pretty good for this, but more hooks (and a faster event dispatch system) would be useful.
9th January 2008, 2:06 pm
daemon.py (via) Neat little Python module for daemonizing a process; handles logging and pid files out of the box.
8th January 2008, 9:58 pm
Job: Django developer in London. I’m consulting with GCap Media at the moment, who are looking to hire full-time Django developers in London for some really interesting projects. Please feel free to contact me directly with questions.
7th January 2008, 9:37 pm
Naming twins in Python and Perl. Simple anagram problem solved in Perl and Python, with a bunch more solutions in the comments. The C# solution provides an interesting example of LINQ in action.
7th January 2008, 11:03 am
FUD and TurboGears. Not cool: the TurboGears guys have been targeted by some (hopefully not deliberate) FUD along the lines of “the author of the TurboGears book is using Django now”, based on Mark posting about his research in to other frameworks.
7th January 2008, 9:02 am
Django Tip: Complex Forms. Malcolm demonstrates some advanced tricks with newforms.
6th January 2008, 10:14 pm
Filtering foreign key choices in newforms-admin. A nice introduction to the Django newform-admin branch, including an example of how to easily implement row-level permissions.
6th January 2008, 8:31 pm
Chatting with Adrian Holovaty. Fabio Akita interviews Adrian about Django and related topics.
1st January 2008, 11:44 am
This Week in Django podcast. Michael Trier’s been doing a really fantastic job putting together a Django podcast. The most recent episode (number 4) includes an update on the newforms-admin branch and a couple of handy tips.
1st January 2008, 10:44 am
django-mptt (via) Jonathan Buchanan’s simple utility for performing Modified Preorder Tree Traversal (efficient tree operations in SQL) on Django models.
29th December 2007, 11:33 am
I definitely like Python 3K’s Unicode support better [...] In fact, I think I prefer Ruby 1.8’s non-support for Unicode over Ruby 1.9’s “support”. The problem is one that is all to familiar to Python programmers. You can have a fully unit tested library and have somebody pass you a bad string, and you will fall over.
— Sam Ruby
28th December 2007, 7:05 pm
Django and Comet. How to build a chat application using Django and the Orbited comet server. Orbited can be set up to proxy most requests through to a Django backend while handling any comet requests itself.
26th December 2007, 9:05 pm
IPy. Handy Python module for manipulating IP addresses—use IP(ip_addr).iptype() == ’PUBLIC’ to check that an address isn’t in a private address range.
24th December 2007, 1:19 pm
Size Is The Enemy. Jeff Atwood: “I’ve started a cottage industry mining Steve [Yegge]’s insanely great but I-hope-you-have-
an-hour-to-kill writing and condensing it into its shorter form points.” Lots of verbose static typing apologists in the comments.
24th December 2007, 10:50 am
WebOb. WebOb is “an extraction and refinement of pieces from Paste”—provides a very nice request and response object, clearly inspired partly by Django. The documentation includes the differences between the WebOb API and that of other frameworks.
23rd December 2007, 10:22 am
Speeding up dateutil: Python’s heapq module turns minutes into seconds. Neat case study in data structure optimisation.
22nd December 2007, 1:07 pm
Pvote (via) Electronic voting machine software in 460 lines of highly readable Python (using Pygame), implemented by Ka-Ping Yee for his doctoral dissertation. Demonstrates prerendering, where as much of the UI as possible is defined in a separate ballot definition file.
22nd December 2007, 1:04 pm
Using Unipath to Keep Things Portable. Django tip to avoid hard-coding full paths. I usually set a global called OUR_ROOT in settings.py using os.path.dirname(__file__) and use os.path.join with it to construct any other paths that I need.
21st December 2007, 10:45 am
Misapplying book terms, Pylons, and the ’end-user’. Ben Bangert responds to Adam Gomaa’s claim that Pylons lacks “conceptual integrity”.
19th December 2007, 11:09 am
Frameworks Exist for Conceptual Integrity. Adam Gomaa just taught me a bunch of interesting things about Django’s underlying philosophy. Looks like I need to re-read the Mythical Man-Month.
17th December 2007, 1:58 pm
The future of web standards. Nice analysis from James Bennett, who suggests that successful open source projects (Linux, Python, Perl etc) could be used as the model for a more effective standards process, and points out that Ian Hickson is something of a BDFL for the WHAT-WG.
17th December 2007, 1:16 pm
Chapter 7: Form Processing. The chapter on newforms I contributed to “The Definitive Guide to Django” is now online, along with the rest of the published book.
16th December 2007, 9:44 pm
stompserver. I think this is the lightweight message queue I’ve been looking for: written in Ruby and EventMachine, easy to set up (thanks to gems), interoperates perfectly with stomp.py.
14th December 2007, 4:40 pm
Two-Faced Django. Excellent Django tutorial by Will Larson that shows how to build a polling application with an interface both on the Web and in Facebook. Also touches on unit testing and Ajax using jQuery.
14th December 2007, 2:44 pm
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.
10th December 2007, 3:25 pm
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.
10th December 2007, 8:40 am
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.
5th December 2007, 3:30 pm
xkcd: Python. Just type “import antigravity”.
5th December 2007, 6:09 am
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.
3rd December 2007, 9:01 pm
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.
— Alex de Landgraaf
3rd December 2007, 8:44 pm
First Notes on Django. Cool, the IETF are developing internal tools with Django.
3rd December 2007, 11:38 am
Oxford Geek Night 4. Tomorrow night, usual venue. Topics include mySociety, Pylons, MythTV and more.
27th November 2007, 9:04 pm
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.
27th November 2007, 7:17 pm
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).
27th November 2007, 3:01 pm
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.
26th November 2007, 3:21 pm
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.
23rd November 2007, 11:54 pm
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”).
20th November 2007, 11:30 pm
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?
16th November 2007, 9:16 pm
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.
14th November 2007, 5:05 pm
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.
14th November 2007, 12:59 am
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.
12th November 2007, 12:55 pm
Orbited: The Orbit Event Daemon. HTTP daemon designed for long-lasting comet connections, written in Python using pyevent on top of libevent.
9th November 2007, 11:01 pm
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.
8th November 2007, 10:59 am
Hello Revver.com 2.0. Revver, one of the more established video startups, have launched their new version which is powered by Django.
2nd November 2007, 7:03 am
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.
2nd November 2007, 6:18 am
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.
31st October 2007, 5:53 pm
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.
26th October 2007, 9:47 pm
Using the extra() QuerySet modifier in Django for WeGoEat. You can use select() on a QuerySet to obtain extra values using subqueries.
24th October 2007, 7:28 pm
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.
22nd October 2007, 11:57 pm
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.
— Jacob Kaplan-Moss
20th October 2007, 1:46 pm
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.
15th October 2007, 10:02 pm
/trunk/jl/scraper. journa-list.com is open source, and the screen scrapers are written in Python.
11th October 2007, 4:10 pm
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.
11th October 2007, 1:52 pm
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.
9th October 2007, 12:23 pm
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.
9th October 2007, 11:33 am
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.
9th October 2007, 2:30 am
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.
9th October 2007, 2:08 am
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).
7th October 2007, 1:06 am
DbMigration—a schema migration tool for Django. Nice and simple tool for adding schema migrations to a Django application.
27th September 2007, 3:04 pm
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.
24th September 2007, 11:57 pm
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.
22nd September 2007, 11:57 pm
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...
21st September 2007, 11:32 pm
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.
15th September 2007, 11:36 pm
Zope3 for Djangoers. I prefer “Djangonauts”, personally. Useful overview of Zope 3 for people with Django experience (first of a multi-part series).
14th September 2007, 3:20 pm
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.
13th September 2007, 3:54 pm
Building the Social Web with OpenID. Slides from my keynote at yesterday’s PyCon UK.
9th September 2007, 12:36 am
django-sphinx (via) More code from Curse Gaming; this time a really nice API for adding Sphinx full-text search to a Django model.
9th September 2007, 12:35 am
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.
9th September 2007, 12:33 am
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.
8th September 2007, 1 pm
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.
4th September 2007, 2:53 am
Amazon EC2 Basics For Python Programmers. Detailed introduction and tutorial from James Gardner.
3rd September 2007, 6:20 pm
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.
3rd September 2007, 1:54 am
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.
3rd September 2007, 1:38 am
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.
2nd September 2007, 10:17 am
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.
1st September 2007, 1:41 am
The use of double underscores creates a separate namespace for names that are part of the Python language definition, so that programmers are free to create variables, attributes, and methods that start with letters, without fear of silently colliding with names that have a language-defined purpose.
— Ka-Ping Yee
1st September 2007, 1:30 am
Python 3.0a1 released. Wow, that was a pretty fast turnaround. Betas are planned for 2008, with a final release scheduled for August.
31st August 2007, 8:36 pm
Satchmo 0.5 Release. Django powered e-commerce application, “the webshop for perfectionists with deadlines”.
22nd August 2007, 10:36 pm
The Shrinking Python Web Framework World. Python used to suffer from a paradox of choice with regards to Web frameworks; today things are considerably easier for new developers.
22nd August 2007, 10:06 pm
BabelDjango. Tools for integrating Christopher Lenz’s Babel i18n framework with Django.
20th August 2007, 2:59 pm
Django on the iPhone. Jacob got it working. The next image in his photostream shows the Django admin application querying his phone’s local database of calls.
19th August 2007, 7:58 am
The Python docs have been redesigned for 2.6. They’re beautiful. The docs for a module are on a single page now (rather than splitting over multiple pages), they’ve added unobtrusive permalinks to individual sections and the whole thing is built on ReST rather than LaTeX.
18th August 2007, 12:39 pm
Changeset 5925. You can now register custom commands for your application with Django’s manage.py script. More sensible than littering your application’s root directory with shell scripts.
18th August 2007, 11:06 am
DictMixin. I wasn’t aware of this Python class (part of the UserDict module): lets you implement __get__, __set__, __del__ and keys() and provides the other dictionary methods for you.
17th August 2007, 10:34 am
AuditTrail. Add change tracking and history to a Django model with a single line of code. Doesn’t handle relationships though, which is definitely the toughest part of this problem.
15th August 2007, 1 pm
Finding Lookup Items that Are Not Used. How to do left outer joins (and other custom SQL) using the Django ORM.
13th August 2007, 5:08 pm
Ubuntu -- python-django. Sweet, Django 0.96 is packaged for Ubuntu Gutsy.
11th August 2007, 8:47 am
Atom Models. Building Python classes that act as utility wrappers around data stored in an lxml DOM object.
7th August 2007, 4:02 pm
A nice example of when to use reduce in python. As a shortcut for assembling a large OR query using the Django ORM.
2nd August 2007, 11:51 pm
Cabochon event server. Written in Python (on top of SQLObject and Paste), uses JSON for messages, allows event consumers to subscribe with a callback URL.
2nd August 2007, 8:36 am
stomp.py. A Python client library for accessing ActiveMQ using the STOMP protocol. Pleasantly simple API for both sending and accepting messages.
1st August 2007, 1:50 pm
Django, iCal and vObject. Easy iCal generation for Django using vObject.
1st August 2007, 11:09 am
Thread Synchronization Mechanisms in Python. Locks, RLocks, Semaphores, Events and Conditions as explained by Fredrik Lundh.
29th July 2007, 9:32 pm
The recent announcement that Mozilla’s next JavaScript engine, Tamarin, will also be a container for functionality written in Python and Ruby (and, one assumes, beyond) is proof that JavaScript is the new Parrot.
— Aaron Straup Cope
29th July 2007, 9:17 pm
mod_wsgi 1.0 Release Candiate Available. mod_wsgi is shaping up to be an excellent alternative to mod_python.
26th July 2007, 8:21 pm
Mozilla and IronPython: IronMonkey. Interesting to note that all three new Mozilla projects are being lead by experienced Python developers.
26th July 2007, 8:07 pm
Instant Django. Portable Django environment for Windows, no installation required. Can also be run from a USB thumb drive.
24th July 2007, 6:49 pm
Django Master Class. Notes and slides from the OSCON tutorial I gave yesterday with Jacob Kaplan-Moss and Jeremy Dunck.
24th July 2007, 3:20 pm
Undelete in Django. Inspired by the conversation about undo the other day, Nathan Ostgard created a simple solution based around custom managers and a trashed_at model field.
20th July 2007, 6:54 pm
Announcing Babel. Impressive new Python i18n / l10n package, with improved message extraction and a huge amount of bundled locale data.
20th July 2007, 12:20 pm
Logic in Templates. I don’t think it would hurt Django to have a bit more support for conditional logic in templates, but I wouldn’t go as far as supporting the ability to call Python functions directly.
19th July 2007, 8:35 am
ThingDB. Another extensible key/value pair data store, constructed for the Open Library based on Aaron Swartz’s Infogami technology.
17th July 2007, 10:21 am
Python Tuples are Not Just Constant Lists. “The index in a tuple has an implied semantic”.
17th July 2007, 7:53 am
lwqueue. Lightweight cross-language message queue system, written in Perl with client libraries in Perl, Python and Ruby.
16th July 2007, 10:04 am
Partial OpenID provider implementation from idproxy.net. It’ll take a while to package up provider support for django-openid, but in the meantime here’s some partial, incomplete, poorly documented example code ripped from idproxy.net. Hopefully this will give people trying to figure out the JanRain Python library a bit of a leg up.
12th July 2007, 6:48 pm
gSculpt. Powerful open source modelling software, written in Python and demonstrated (to much applause) as the last lightning talk of EuroPython 2007.
11th July 2007, 11:48 pm
pybraces. I didn’t know this was possible: a source level filter implemented as a custom -*- encoding: braces -*-
11th July 2007, 2:48 pm
Bazaar/Avahi mDNS Plugin. Adds ZeroConf support to Bazaar, so you can “bzr share” a branch over the local network and “bzr browse” to discover shared branches. Designed for sprints with a local network but no internet access.
10th July 2007, 10:17 am
PyCon UK 2007. The weekend of the 8th and 9th of September, currently accepting talk submissions. I’ll be running a Django tutorial session.
10th July 2007, 9:42 am
Storm. New Python ORM from Canonical, emphasising multiple database support, intelligent local cache invalidation and a thin layer over the underlying SQL.
9th July 2007, 8:44 am
Interview with Leah Culver: The Making of Pownce. Django + Perlbal + S3 + AIR.
7th July 2007, 10:05 pm
The Django Web Application Framework. I’m slowly pushing my presentations from the past couple of years up to Slideshare. This is a Django talk from April 2006, so it’s a little out of date.
5th July 2007, 1:07 am
PyMOTW: subprocess. Better documentation for the swiss army knife of process control tools.
4th July 2007, 10:18 am
Web hosting landscape and mod_wsgi. Graham Dumpleton explains how mod_wsgi’s daemon mode should provide secure Python deployment for commodity hosting providers.
2nd July 2007, 3:47 pm
dnspython. Python DNS toolkit—seems like the kind of thing that should be in the standard library.
1st July 2007, 11:55 am
Python, Mac OS X, and Readline. This worked for me, though you need to already have gcc and svn installed. It’s crap like this that made me switch to Ubuntu on Parallels for most of my Python development.
30th June 2007, 10:24 pm
Python 3000 Status Update. Doesn’t look like we’ll get multiline lambdas, but the other stuff looks great. I’m not looking forward to years of Python 2 and Python 3 co-existing and splitting the community though (ala PHP 4 and 5).
19th June 2007, 1:49 pm
Mac OS X Leopard: UNIX. Leopard ships with DTrace, and it’s been hooked in to Java, Ruby, Python and Perl.
11th June 2007, 11:05 pm
google-diff-match-patch (via) Robust algorithms to perform the operations required for synchronizing plain text, in Java, JavaScript and Python.
9th June 2007, 6:15 pm
Wait For It (via) Neat WSGI middleware from Ian Bicking that launches a thread for every incoming request and watches for slow responses; if something is taking too long it returns a “please wait” page to the user and polls for completion.
9th June 2007, 4:53 pm
Talking to the internal GPS in my N95 from Python. Thanks to a new LocationRequestor module for Python Series 60.
6th June 2007, 10:31 am
start.gotapi.com. Lightning fast lookups of API documentation; includes Python docs, YUI, HTML, CSS and lots more.
5th June 2007, 6:05 pm
’tie’ considered harmful (via) Rich Skrenta on the disadvantages of abstractions like Perl’s tie, which lets you create hash data structures that aren’t actually hashes. Operator overloading (as seen in Python) suffers the same problems.
30th May 2007, 11:11 pm
oxfordgeeks.net
Nat and I had a bit of a mini-hackday this bank holiday Monday. Nat’s been doing a great job summoning local geeks out of the woodwork with Oxford Geek Nights event, but it’s still pretty hard to find other interesting events in the Oxfordshire area. It’s not that there aren’t any, it’s just that the geek community in Oxford is currently pretty fragmented. [... 295 words]
Levenshtein. Python C extension for Levenshtein distance and other advanced diff functions.
27th May 2007, 6:51 pm
Test stubbing httplib2. Nice demonstration of monkey-patching as part of unit testing in Python.
10th May 2007, 11:24 pm
Just because Java was once aimed at a set-top box OS that didn’t support multiple address spaces, and just because process creation in Windows used to be slow as a dog, doesn’t mean that multiple processes (with judicious use of IPC) aren’t a much better approach to writing apps for multi-CPU boxes than threads.
— Guido van Rossum
8th May 2007, 9:21 pm
The One True Object (Part 2). Jim Hugunin describes how the DLR let’s Python / JavaScript / Ruby talk to each other using a message passing abstraction.
5th May 2007, 1:27 am
The joy of pdb.set_trace(). I use nosetests --pdb-failures as my main entrypoint for Python debugging—it starts the debugger at the first failing test.
25th April 2007, 11:37 pm
django-logging. Looks neat—includes the ability to use Python’s standard logging module to log messages to a footer appended to your site’s HTML output.
24th April 2007, 6:50 am
Turn your Django application in to an OpenID consumer
I’ve just put the finishing touches on the first releasable version of django_openidconsumer, a package that makes it easy to add OpenID consumer support to any Django application. [... 229 words]
modwsgi. Apache module (written in C) for hosting Python WSGI applications, no mod_python required. Includes Django integration instructions. Has anyone tried this out?
14th April 2007, 9:48 am
Avoid IE Brokenness When using Vary and Attachments (via) Django middleware that works around a bug in IE where external applications fail to load content that was served with a Vary header.
9th April 2007, 9:41 am
How to Write a Spelling Corrector. Example code in Python, by Peter Norvig.
8th April 2007, 9:42 pm
Debian GNU/Linux 4.0 released. Includes Iceweasel (Firefox), Icedove (Thunderbird), Iceape (Seamonkey) and Python 2.4.4 as standard.
8th April 2007, 6:25 pm
PyCon Wireless Network. Conference WiFi is generally bad, and getting worse as more people turn up with laptops. Here’s how Sean Reifschneider built a solid network for PyCon 2007 for $2200 in hardware and 70 hours of work.
6th April 2007, 10:39 am
Mass Video Conversion Using AWS. How to use S3, SQS, EC2, ffmpeg and some Python to bulk convert videos with Amazon Web Services.
3rd April 2007, 11:44 pm
phpsh. An interactive shell for PHP, developed at Facebook and written mostly in Python. Facebook are really pushing their open-source stuff at the moment.
3rd April 2007, 9:43 am
DjangoKit. Early preview release of a tool that lets you package a Django application up as a fully contained OS X application. When Leopard ships with PyObjC this kind of thing will be even easier.
29th March 2007, 12:50 am
PyPy 1.0. The fascinating Python implemented in Python project reaches 1.0, and now includes a JIT compiler. It’s still not recommended for general use though.
27th March 2007, 11:48 pm
cmemcache. Python extension for libmemcache which provides more than twice the performance of the pure-Python memcached client. Supported by Django development version.
27th March 2007, 1:51 pm
The Athena Framework. CERN’s ATLAS particle accelerator experiment is scriptable with Python.
26th March 2007, 2:43 pm
Free Software Foundation to switch to Django. “FSF is switching from Zope to Django (both Python powered!) for web application development... Lots of new stuff coming soon, including contributions back to the Django community.”
25th March 2007, 7:56 pm
Python web development and frameworks in 2007. A fair and detailed look at the current main options for web development with Python.
25th March 2007, 5:30 pm
TweetyPy. A Python-based CLI client for Twitter, by Stuart Colville
24th March 2007, 4:47 pm
Algorithm Education in Python (via) A paper describing the usage of Python in Algorithm courses at UC Irvine. I found Python invaluable when I was at university and would have loved to see it become part of the official curriculum.
19th March 2007, 1:46 pm
pg8000 v1.02. The pure Python PostgreSQL library now supports DB-API 2.0 (and SSL too). That didn’t take long!
13th March 2007, 9:18 pm
pg8000 (via) A pure-Python interface to PostgreSQL, using the PostgreSQL network protocol directly. Doesn’t (yet) support DB-API 2.0, but that’s promised in a future release.
9th March 2007, 7:35 pm
Hacking del.icio.us with Python. Nat introduces snaflr, a Python script for republishing selected links from a number of del.icio.us users to one communal account.
6th March 2007, 11:11 pm
Five things I hate about Python. By Jacob Kaplan-Moss. I didn’t know you could force eggs to install unzipped with an option in ~/.pydistutils.cfg—that’s always been my least favourite thing about them.
4th March 2007, 10:32 pm
pear 0.8. “A libevent/pyevent-based locking session daemon for the web”. Relational databases aren’t particularly well suited to the access characteristics of session data.
4th March 2007, 9:19 pm
Scaling Python for High-Load Web Sites. Slides from a talk at PyCon. Be sure to switch to the notes view (Ø in the bottom right)—a really nice overview of scaling up from a CGIs to load balanced, memcached Python application servers.
4th March 2007, 9:14 pm
soupselect. My simple extension to BeautifulSoup that allows you to grab elements using CSS selectors; should be useful for parsing microformats.
28th February 2007, 1:47 pm
Django snippets. James Bennett’s new site for Django snippets. The source code to the whole site is available.
26th February 2007, 10:08 am
PyCon Day 1: OLPC Has Excited me. Did you know that the OLPC machines have a “show source” button?
23rd February 2007, 11:21 pm
30 second PyPy tutorial. Zyroth on programming.reddit.com shows how to interactively compile a Python function to C using PyPy and benchmark it against the original.
18th February 2007, 9:30 pm
Automated Translation of Java to Python. java2python can translate most Java code in to non-idiomatic Python, using ANTLR for the heavy lifting.
15th February 2007, 3:50 pm
Say Hello to Elixir for SQLAlchemy. New ActiveRecord style layer over SQLAlchemy; a collaboration that includes the authors of ActiveMapper and TurboEntity.
12th February 2007, 10:28 pm
soaplib (via) New open-source Python SOAP library, with a pleasantly Pythonic looking API.
12th February 2007, 10:26 pm
boto. Python library for accessing Amazon’s S3, SQS and EC2 Web Services, with excellent documentation.
11th February 2007, 12:17 am
Parallel Python. A simple mechanism for running Python code in parallel across multiple processes and/or machines, based on submitting jobs and retrieving their results.
9th February 2007, 1:51 am
Mono 1.2.3 has been released (via) More importantly, it ships with IronPython in the form of Seo Sanghyeon’s Community Edition.
9th February 2007, 12:55 am
TurboGears and Pylons (a technical comparison). Ian Bicking explores the differences between the two, and finds that the most significant is probably CherryPy v.s. Paste.
7th February 2007, 1:51 pm
IronPython URLs. Mark Rees’ and Seo Sanghyeon’s collection of interesting URLs posted to the IronPython mailing list.
4th February 2007, 5:25 pm
nose. Really nice Python unit testing tool—run ’nosetests somedir’ and it finds and executes every unittest (and test_like function) it can find in that directory tree.
1st February 2007, 2:20 am
Spelling correction using the Python Natural Language Toolkit. Uses porter stemming to implement a search engine ’did you mean’ feature based on the Brown Corpus.
31st January 2007, 10:07 pm
Pickles Begone. Barry Warsaw’s notes on adding SQLAlchemy persistence to Mailman.
23rd January 2007, 1:43 pm
CSS library for Python (via) “A Python package to parse and build CSS Cascading Style Sheets. Partly implements the DOM Level 2 Style Stylesheets and CSS interfaces.”
15th January 2007, 2:32 am
Apache Solr 1.1. Solr is the search Web Service built on top of Lucene. The latest release introduces JSON, Python and Ruby response formats in addition to XML.
13th January 2007, 1:16 am
What Python looks like naked. Michal Wallace has been doing some really interesting work writing purely functional code in Python. His latest experiment replaces all of the basic Python statements with equivalent functions.
10th January 2007, 11:22 pm
mimeparse.py (via) Parsing mime-types is harder than you might think.
8th January 2007, 6:43 pm
supervisor2. I haven’t tried this yet, but looks like a decent process monitoring tool. It even has an XML-RPC interface.
8th January 2007, 1:19 am
Why doesn’t Python have more data format readers in the stdlib? I for one would love to see simplejson included in the standard library, with or without a C implementation.
8th January 2007, 1:03 am
Writing a Jokosher extension. I like the way API calls are made through an API object passed to the extension’s startup function.
7th January 2007, 10:25 pm
killableprocess.py. “I have created a python module which can launch a subprocess, wait for the process with a timeout, and kill that process and all of its sub-subprocesses correctly, on Windows, Mac, and Linux.”
23rd December 2006, 12:23 am
html5lib (via) A python library for working with HTML5 documents.
22nd December 2006, 11:58 pm
The Daily Python-URL. Python’s number one news source, now powered by Django.
22nd December 2006, 11:39 pm
__builtins__ usage. Avoid using __builtins__ if you want your code to be compatible with IronPython.
18th December 2006, 3:22 pm
Meta-classes Made Easy. Fuzzyman introduces a metaclass factory for applying a decorator to every method of a class.
17th December 2006, 12:42 am
SubWiki (via) A wiki that uses Subversion for its data repository, implemented as a Python CGI.
16th December 2006, 7:19 pm
Dependency injection is the enterprisey name for trampling over namespaces with reckless abandon.
— Ted Dziuba
16th December 2006, 1:05 am
[Python-3000] Refactoring tool available. Guido’s initial work on a tool for converting Python 2.x code to Python 3K.
15th December 2006, 2:19 pm
Statement Functions. Smart workaround for the lack of multi-line lambdas in Python.
12th December 2006, 7:08 pm
100% Python SCGI implementation. SCGI is like FastCGI but simpler.
12th December 2006, 1:37 pm
python-cluster. Fantastic interface design—pass a list and a function and you’re done.
7th December 2006, 5:19 pm
Incompatible SQLite in OS X and Python. I’ve hit this problem; James has the solution.
28th November 2006, 5:40 pm
Fun with ctypes
This probably only works on Intel-based OS X machines: [... 86 words]