Jacob Kaplan-Moss
Activity tagged “python”
Bookmarks
Writing traceroute in 40 lines of Python
We generally think of languages like Python as high-level languages, but that doesn't mean they're not capable of diving down into low-level territory.
Popular recipes by Raymond Hettinger « ActiveState Code
You could teach an advanced Python class by just going over all of Raymond's Python recipes.
[Catalog-sig] PyPi & PSHB
Some info and code from Justin Lilly on hooking up a PSHB callback to PyPI.
Ian Bicking: a blog :: Re-raising Exceptions
Everything you ever wanted to know about re-raising exceptions in Python.
Python Package Index : pudb 0.92.13
A full-screen console (curses) debugger for Python. Looks like a nice middle-ground between pdb/ipdb and a GUI debugger.
Why I (A/L)GPL
Well said.
Python Projects in Users’ Home Directories with wsgi | Code Spatter
Nice technique for lightweight WSGI apps without needing to touch your Apache conf after the initial setup. I'd like to do something like this for my personal site so that it's easier to deploy quick & dirty apps.
Enable setup.py test in your Django apps | Surfing in Kansas
Everyone: do this. Now.
ericflopsy.py
Eric's fork of Nathan's flopsy, a simple AMPQlib wrapper.
hatful of hollow - Visualising Sorting Algorithms
Really awesome, and I think I finally understand how heapsort works. Oh, and it comes with bonus Python+Cairo examples.
Scrapy – Trac
Interesting: “an open source web crawling and screen scraping framework written in Python.”
Rabbits and warrens. - Jason’s .plan
A good introduction to message queues, specifically RabbitMQ.
Candygram
An implementation of Erlang-style concurrency for Python. Processes are implemented on top of threads, unfortunately, so there's a pretty low limit on the level of concurrency, which illustrates the problems with “porting” a concept like this between languages. Still the API is relatively sane, and with some work on the underlying model — perhaps a switch to select/epoll — this could be a very nice addition to the Python concurrency toolkit.
Buildout - software build system reloaded!
zc.buildout, the build isolation system I've been using, has finally grown its own website, with real, actual documentation. Awesome.
Farmdev: What Makes Pylons Stand Out As a Web Framework
A really good summary of what's good about Pylons. I'm glad to see that the recent 0.9.7 release adds “documentation” to the list; all too often, poor or missing documentation cripples an otherwise good chunk of code.
Interlude - Write Python Doctests interactive — BlueDynamics Alliance
Drop into an interpreter in the middle of your doctest. Brilliant!
Whoosh
Pure-Python search engine. Looks like a great idea if you need something simple and don't want to mess with an external service.
Let's talk about Python 3.0
It uses Python 3 or it gets the hose. On a more serious note, James absolutely nails it w.r.t Python 3.
Mock It!: An lxml you can bank on
Finally! easy_install staticlxml and done.
Python Package Index : collective.buildbot 0.3.3
A set of zc.buildout recipes that make it *stupidly* easy to configure and set up a buildbot master or slave — it's literally like six shell commands to get a dummy buildbot going. Totally freeking awesome.
Intro to Unintrusive JavaScript with Django @ Irrational Exuberance
A wonderful introduction to making AJAXy sites with Django. Make sure to pay attention to the first step: “the first step to implementing an Ajax webapp is to implement the webapp without Ajax.” Word.
The Fluther Blog » Blog Archive » mogileFS for Django
How to integrate Django 1.0's file storage APIs with MogileFS.
djangopony - Magic that can't be removed.
I literally laughed so hard I nearly fell out of my chair.
CleverCSS
Like those hackish CSS preprocessors that everyone writes when they get pissed about CSS's lack of variables, except actually well-thought-out and basically awesome. I think I'll be using this for my CSS from now on.
Django cheat sheet (Mercurytide)
Really purty one-page cheat-sheet, updated for Django 1.0.
Simon Willison: Announcing dmigrations
The schema evolution in Django space is really heating up. With luck we can keep the competition friendly, and pull out a best-of-breed solution to roll back into Django.
Zookeepr | Main / HomePage browse
A conference management package developed by LCA.
Spawning + Django - Eric Florenzano's Website
Is Spawning Python's answer to Mongrel?
Keyphrene - 4Py Homepage
Wrappers for OpenSSL and LibSSH2.
Simple Top-Down Parsing in Python
Fantastic article on building a top-down parser in just a few hundred lines of Python. Read this even if you don't care about parsing: effbot really demonstrates many of the cool idiomatic tricks that makes Python such a pleasure to write and read.
Fusil - Trac
A library for writing fuzz testing programs.
pgmigrate - Google Code
Another database migration tool. This one's not Django-specific (though it will work with Django), but it is PostgreSQL specific. I'm really quite happy with the competition in this space right now; it'll force any eventually Django built-in migration to
Annotype
“Neat script I wrote for a friend to annotate a Python script with the types observed during a run of the program.”
Debian User Forums :: View topic - Etch and Python 2.5
How to make Python 2.5 the default on Debian Etch
Emulating ActionScript's “with” statement in Python
Stack hacking for fun and profit.
Ian Bicking: Python HTML Parser Performance
The short version: lxml kicks ass.
Proven Corporation » Blog » Sphinx Templates
Some nice notes on how the Sphinx templates are laid out.
[Python-Dev] PEP 361: Python 2.6/3.0 release schedule
“Executive summary: Python 2.6 and 3.0 finals are planned for September 3, 2008.” Woo!!
Dino's Blog : IronPython, MS SQL, and PEP 249
How to run Django (0.96) on IronPython, including an MSSQL backend.
Elegant Stitches
The folks that made the Django Ts and hats for PyCon, as well as all the great Python gear for sale. Great quality and great people!
Python Package Index : haufe.eggserver 0.1.10
haufe.eggserver is a tiny webfront to a local egg/sourcecode archive distribution directory (eggs and other distribution files stored directly on the filesystem).
Writing Python/C extensions by hand
An exploration of writing a Python/C extension in pure C versus using ctypes. The takeaway is that ctypes is slower, but easier.
xmldiff
“a python tool that figures out the differences between two similar XML files, in the same way the diff utility does” Seems a bit buggy, but might be useful
James Henstridge » Two‐Phase Commit in Python’s DB‐API
Two-phase commit proposal for Python. A bit esoteric, but this could help us crazy ORM weenies a bit.
iCalendar package for Python
Another iCalendar library. This one has perhaps the best API of all the ones I've used and seems to work with all the iCal feeds I've thrown at it.
Python Package Index : magicdate 0.1.3
A plugin for optparse to do fuzzy dates. Lets your CLI scripts take arguments like “—start today —end tomorrow”; very cute.
Python Package Index : Fabric 0.0.3
“… a bit like a dumbed down Capistrano, except it's in Python, dosn't expect you to be deploying Rails applications, …. Unlike Capistrano, Fabric wants to stay small, light, easy to change and not bound to any specific framework.”
Coder Who Says Py: Initial slides for PyCon core development tutorial online
Brett's (preliminary) slides on contributing to Python. I need to prepare something similar for Django.
Writing An Hadoop MapReduce Program In Python - Michael G. Noll
Neat. I hadn't realized that Hadoop map/reduce jobs could be a bog-standard shell script. It's especially cute that testing the job comes down to “cat data | map | reduce”.
[Python-Dev] Monkeypatching idioms — elegant or ugly?
A bit of code from GvR to make monkeypatching look cleaner. Very clever (of course), though I'm not sure how much I like it: I *like* that monkeypatching looks ugly in Python; it makes the monkeypatch code smell more obvious.
InstallationOSXLeopard - IPython
Finally, a working readline for Leopard: “easy_install -f http://ipython.scipy.org/dist/ readline”
g :: A Simple Plugin Framework
Marty implements a plugin architecture in six (brilliant) lines of code.
StaticGenerator for Django
A cool idea: pre-bake static pages generated by Django. Sometimes simple is better.
TrueCrypt explained
Cryptography makes my head hurt.
Utilitymill's developer comments on the security model
Sounds relatively smart. However, I'd be suspicious of using chroot — I'm told it wasn't especially designed to be a security feature exactly. Were I to do something of this nature, I'd probably use pypy-sandbox.
Front Range Pythoneering: Django on Jython: Minding the Gap
The Front Range Pythoneers strike again: Django now runs pretty well on Jython. This really is a big deal.
Handwriting on the Sky - Export for Python
A neat idea: explicitly control which symbols a module exports. It smacks a bit of B&D programming, but could be useful.
macosxhints.com - 10.4: Combine PDFs without using Automator
Man, OSX ships with all sorts of gems.
Revision 59590: /doctools/trunk
The new toolchain for the Python docs. Lots of smart stuff going on in here.
PyLinda: PyLinda - Distributed Computing Made Easy
An implementation of tuplespaces in Python
PyRTF - Rich Text Format (RTF) Document Generation in Python
RTF generator written in Python. Looks like a docutils writer based on PyRTF should be pretty trivial, and that might make a better reST -> Word workflow than my current reST -> ODF -> OO.org -> Word nonsense.
xkcd - A webcomic of romance, sarcasm, math, and language - By Randall Munroe
XKCD discovers what we've known all along. Let the latest battle in the language wars begin.
Eventlet - Second Life Wiki
Non-blocking IO library by Linden Lab. I've heard awesome things about this; gotta give it a try.
FOSS4G 2007 : GeoDjango - Geographic Web Applications for Perfectionists with Deadlines
Justin and Travis' presentation on GeoDjango from FOSS4G
http://svn.red-bean.com/pyobjc/branches/pyobjc2/pyobjc-core/NEWS.txt
All (and there's lots of it) the new stuff in PyObjC 2 (i.e. the version in Leopard). Really, really nice stuff here.
OS X Automation » Blog Archives » IPython tab completion fix on Leopard
Good thing someone figured this out — without ipython I don't know how I'd get any work done!
IBM’s Python and DB2 drivers released | Zen and the Art of Ruby Programming
Sweetness. Hopefully someone'll use this to work on a DB2 driver for Django.
PyCha - Trac
Python charting package. Yes, it's YA, but this one uses Cairo and looks *nice*.
Python Package Index : IPy 0.51
Nice utility class for dealing with IPv4/IPv6 addresses. Especially nice is the netmask handling; I never have been very good at calculating netmasks by hand.
ASPN : Python Cookbook : Getting items in batches
I never remember how to do this right. Don't miss the comments for Raymon Hettinger's amazingly clever version.
Jaiku | most of jaiku's stuff is written in python using twisted, and devku is running django
Apparently Jaiku is using Django internally, which means Google's now using Django in yet another place.
Apple Bits
Scroll to the bottom for extractkeychain.py, a quick script to dump keychain passwords to plaintext (you *are* piping that into GPG/OpenSSL, right?)
The Py Side of Life: String types in Python 3
Some important notes about strings in Python 3. There's a subtle but important change from 3a1: the bytes type is now immutable. This is a good change IMO; the net result sounds very sane.
tranquil - Google Code
Beautifully simple Django/SQLAlchemy integration layer that automatically maps Django models into SQLAlchemy ORM objects. In theory a similar approch would allow SQLAlchemy objects to be exposed as Django models; that would kick ass.
parsedatetime project
From the Chandler project, a Python module to parse “natural” datetime constructs (i.e. “tomorrow”, “next monday”, and even “two weeks from last thursday at noon”). The API is shitty and Java-esque, but the functionality is great.
py-bcrypt - strong password hashing for Python
We should support bcrypt in Django if this module is installed.
Memory Dump » Blog Archive » Zope3 for Djangoers. Part 1: Installation
This looks great. All my Zope knowledge comes from the hairy Zope2 days, so I really need to brush up on the brave new world of Zope.
BabelDjango - Babel - Trac
Interesting work to integrate Django and Babel. Even if you don't need translation, there's some useful date/time/decimal formatting template filters here.
ElementTree: Working with Namespaces and Qualified Names
Required reading for working with namespaces and ElementTree. It's not hard, but there are a lot of details to get right.
From Rails to Django — Myles Braithwaite
“Recently I switched all of my websites to Djanog from Rails and you can see the difference.” Wow, an amazing difference in RAM consumption. Especially surprising given that Python/Django isn't exactly known for low memory usage.
Gruber: “If Python 3.0 ships before Perl 6, I'm going to cry”
Someone order the man some Kleenex; he's gonna need 'em.
The Hand of FuManChu - Storm, SQLAlchemy, and Geniusql
Not sure about the quality of the benchmarks, but I'd nevertheless still like to see how Django stacks up here. Not very well I'd imagine, but Django's always been an 80% ORM anyway, so 80% of the performance would be just *fine* with me.
livinghardknox » Blog Archive » Django and the iPhone
Sweet - someone wrote up the (simple) steps to getting Django running on an iPhone. Now I don't have to!
http://svn.colorstudy.com/home/ianb/recipes/patmatch.py
Erlang-ish pattern matching in Python, from Ian Bicking.
PyBugz - Python Interface to Bugzilla | liquidx
Python-based command-line front-end to Bugzilla.
Python Cheese Shop : threadpool 1.2.2
A nice and simple producer/consumer threadpool utility. Hooray for doing the simplest possible thing.
Pyglet: /trunk/tools/wraptypes
A tool for parsing C header files and generating ctypes wrappers. From the pyglet project, which includes ctypes wrappers for OpenGL. I'm not sure if this is tunned specially for OpenGL, but if it's roughly generic it could save *lots* of time.
lwqueue: Lightweight cross-language message queue system
A stab at a memcached-like message queue. Looks super-simple, and 1000 op/s isn't half shabby.
dpaste: #14224: anyetree
I got frustrated by the etree import dance, so I wrote this.
Ned Batchelder: hyphenate
Frank Liang's hypenation algorithm (i.e. the good one that TeX uses) in Python.
templatemaker - Google Code
Adrian's “reverse template engine:” take a series of files and construct a template that could have been used to generate those pages. Obviously extremely useful for data scraping.
Now with Django powered goodness!
Antonio on Django/Tabblo: “the HP folks doing diligence on us started by asking why we had not chosen Ruby on Rails and came out the other end incredibly impressed with our Django choice.”
gameobjects - Google Code
“Game Objects is a collection of 2D and 3D maths classes, and algorithms for helping in the creation of games with Python. Suitable for PyGame, but independent of it.”
The Future of TurboGears - TurboGears | Google Groups
TurboGears 2.0 will be built on top of Pylons. This is a very good thing for the Python web community. This has majorly cool implications for Django, too, so I better get my butt in gear and start coding.
ASPN : Python Cookbook : xml reverse-engineering ElementTree code generator (*whew*)
“takes an ambiguous xml file and generates the ET code to generate that xml file”
Django-fr | Le Framework Web python pour les perfectionnistes
The “official” (well, as official as it gets) version of the Django site.
Python - F8
PyFacebook — Python wrapper for the Facebook API. Uses Django by default.
Book - NLTK
A book on natural language processing in Python.
techspot.zzzeek.org » Blog Archive » Polymorphic Associations with SQLAlchemy
A good explanation of the underlying SQL behind polymorphic associations. This is how Django does so-called “generic relations” (through a centralized content-types table instead of the address_associations table here).
PEP 2 — Procedure for Adding New Modules
This is how Python does additions to the stdlib. We probably should look to do something similar…
snakefood: Python Dependency Graphs
For a while now I've been talking up the new things Python 2.5's AST will allow; this is just the tip of a very exciting iceberg.
Python Cheese Shop : processing 0.21
“Package for using processes which mimics the threading module, and allows the sharing of objects between processes.”
plasTeX - LaTeX Document Processing Framework
Pure Python LaTeX parsing/processing tools. Neat.
How to Write a Spelling Corrector
Awesome article on how you can write a simple spelling corrector in a handful of lines of Python.
R/SPlus - Python Interface
Python/R connectors.
Amazon Web Services Developer Connection : Monster Muck Mashup - Mass Video Conversion Using AWS
Holy freaking crap this is cool.
matplotlib without a GUI
Useful notes on using matplotlib without the pylab interface.
ModPython/Articles/ExpatCausingApacheCrash - Graham's Project Wiki
Great writeup of *why* expat can cause mod_python to segfault. The mod_php + mod_python crashes that some Djangonauts see happen for exactly the same reason, so the debugging advice here is useful there, as well.
Bitten - Trac
Continuous integration tool that integrates with Trac. We really should get this set up for Django…
Ask Reddit: How did you end up using Django? (reddit.com)
A good collection of stories from Django users. Gives me the warm fuzzies :)
CPS Project: NXLucene
Another Lucene-based web service tool (this one based on Plone)
Welcome to pyglet
“Pyglet is a cross-platform gaming / multimedia library written in pure Python.” Built on OpenGL.
pythong.org.
These guys have some interesting ideas about Python Packaging.
svn-foreign
A tool to review an svn repository with new files/conflicts and quickly decide what to do with them. Pretty nifty.
pydoctor
YA python to API doc tool. But this one's by mwh, so it's likely a cut above.
Voting Research
Ping's page on his voting research. Some hackers hack code, others hack democracy.
Connectors for the NdbApi in Launchpad
Low-level database connectors for MySQL. Essentially you get to use a relational database without SQL. Could be very interesting when combined with an ORM.
PythonTestingToolsTaxonomy - Cheesecake - Trac
An amazing breakdown of the various Python testing tools — there are even more of them then web frameworks!
Unipath
Treat paths as objects, not strings. Even better than Jason's path.py, and there's even a chance this one'll end up in Python's stdlib.
Django profiling with hotshot and kcachegrind
Whoa, cool!
tfclassify - Trac
A document classification algorithm. Wonder if it would be useful for classifying stories…
rnc2rng
Python code to convert RelaxNG Compact to the XML syntax.
Same Con To Hoyci » Highlighting Code Using Pygments and Beautiful Soup
I need to add something like this to my site.
Python Goodies
smtpd.py — if it's good enough for Guido, it's good enough for me.
VObject Home
Matt says this is a better iCal library than the other two I just bookmarked…
Python Cheese Shop : calcore 2.1.0
“CalCore is an advanced, flexible calendaring component for Python. It allows the Python developer do write advanced calendaring applications either using their own event storage or integrating with external calendar servers.”
Python Cheese Shop : itools 0.14.3
A bunch of format tools; itools.csv, itools.ical, …
perezvonの日記 - Django on IronPython
Wonderful.
[Psycopg] ImportError: libpq.so.3: cannot open shared object file: No such file or directory
Ah, ld.so.conf…
Open Source Flash - flashticle
flashticle is a MIT licensed Python 2.4 library implementing various Macromedia Flash related data formats and protocols. flashticle is sponsored by Mochi Media, LLC.
The ElementSoup Module ::: www.effbot.org
Fan-frickin-tastic!
ASPN : Python Cookbook : Automatic Southwest Boarding Pass
“Travellers who fly Southwest airlines know all too well the importance of “getting an A” so they can board in the first boarding group… With this script you will never again miss “getting an A” regardless of when your flight is.”
Django: Web Development with Journalists' Deadlines
My OSCON session
Django: Web Development with Journalists' Deadlines
My OSCON tutorial
Python and Microsoft Access
Using the Jet engine (MS Access) from Python on Windows
Python Web Framework Statistics
Python Web Framework Statistics
nabu: a Publishing System using Text Files
Nabu is a simple framework that extracts chunks of various types of information from documents written in simple text files (written with reStructuredText conventions) and that stores this information (including the document) in a remote database for late
Python in Your Pocket: Python for S60
Matt lays down the info
PyRRD - Trac
Pythonic RRD bindings — only just getting started, but already quite a bit nicer than the standard bindings.
Django | Snakes and Rubies downloads
Video and audio from the Snakes and Rubies event
PySyck
PySyck is aimed to update the current Python bindings for Syck. The new bindings provide a wrapper for the Syck emitter and give access to YAML representation graphs. Hopefully it will not leak memory as well.
from __future__ import * » simple_json 1.0
MIT licenses JSON encoder/decoder in Python. Besides the better license, the code is much clearer than json-py
Snakes and Rubies :: Index
Witness an epic battle of Those WIth Strange Last Names Who Write Web Frameworks
[boston-pig] TurboGears vs. Django
A very good and fair comparison of Django and TurboGears
Enough for today - from fraca7 import *
Python for PSP!
svnperms.py
A hook script for SVN that can be used for fine-grained permissions.
Django: Python Web framework
Oh yeah…
Using reST with wordpress
I've been looking for something like this!
PyCon DC 2005 Call for Proposals
Deadline is Dec 31st — get your act together, Jacob!
securehidden.py (Ian Bicking)
Generate secure values for hidden input fields that can't be tampered with
Entries
GvR on commit privileges
A quote from Guido van Rossum on commit privileges.
What to do when PyPI goes down
How to work around a PyPI outage.
Python is Unix
Porting Ryan Tomayko’s simple prefork network server into Python. You know, because it’s there.
Snakes on the Web
The history and future of Python web development. A talk given at PyCon Argentina and PyCon Brazil, 2009.
Looking for a Django developer?
Need an experienced Python/Django developer? A good friend of mine needs a new gig.
Nobody expects Python packaging!
Python has one package distribution system: source files and setup.py install. And easy_install. Python has two package distribution systems…
Python implementation details
The main part of getting Django working on alternate Python VMs was fixing the various assumptions we made about implementation details of Python.
Why I’m excited about Python 3
and why you should be, too.
Five things I hate about Python
Inspired by Titus (who was in turn inspired by brian d foy), here’s what I hate about Python. I completely agree with Brian that you can’t trust any advocate who doesn’t know enough to find stuff to hate. Given that I spend a lot of time advocating Python, writing down what I hate seems a good exercise.
Photos