Simon Willison’s Weblog


877 items tagged “python”


HOWTO: Adding an RSS feed to a Subversion Server. Using post-commit hooks and some Python. # 17th August 2006, 11:17 pm

YDN Python Developer Center. Launched today: tips and tutorials on accessing Yahoo! Web services from Python. # 8th August 2006, 8:57 pm

The YDN Python Developer Center

I recently had the opportunity to put together the Python Developer Center for the Yahoo! Developer Network. YDN is one of my favourite parts of Yahoo! so I jumped at the chance, and the resulting mini-site is now online (YDN blog post here).

[... 235 words]

Exciting stuff in Python 2.5

Python 2.5 alpha 1 is out, and as usual the What’s New in Python 2.5 document provides a pleasant overview of the new features. There are some real treats in there. While I’m hoping that the syntax for conditional expressions will grow on me, I’m looking forward to Partial function application becoming a common Python idiom. Relative imports are going to make Django applications a lot easier to redistribute, and I can’t wait to see all the crazy hacks that result from the introduction of coroutines.

[... 291 words]


Things I learned at EuroOSCON

Last week was the first ever O’Reilly European Open Source Convention, held in the magnificent NH Grand Hotel Krasnapolsky in Amsterdam. It was the first big budget conference I’d been too (previously I’ve stuck to less expensive affairs such as SxSW Interactive and PyCon) but the money seems to have been well spent. The venue was fantastic and there was a great line-up of speakers, keynotes and panels.

[... 878 words]

[pypy-dev] PyPy released! A full Python implementation written in Python. # 25th May 2005, 12:52 pm


Python will assimilate you (via) “From the wind-up school of technology strategizing” # 8th August 2004, 6:49 pm

PHP 5 Release Candidate 1

I haven’t blogged much about PHP in a while because I’ve been up to my nose in mod_python and loving every minute of it. This news is just too important to miss: PHP 5 Release Candidate 1 has been released, bringing the first production-ready release tantilisingly close. While I doubt PHP 5 will tempt me back it’s definitely an exciting upgrade—my biggest complaint with PHP 4 is the brain-dead object model which defaults to copying whole objects rather than passing references, and this is one of the many things addressed by PHP 5. The new libxml2 powered XML features sound really powerful, and SQLite as an on-board database should be ideal for knocking out small stand-alone applications without needing to set up a mySQL database for them.

[... 173 words]

AppScripting (via) The power of AppleScript with the less verbose syntax of Python # 6th January 2004, 2:12 am


Donate to the PSF! Support Python as well. # 20th December 2003, 10:02 pm

Python Natural Language Toolkit (via) Yet another reason Python at University is a great idea # 23rd November 2003, 11:54 pm

Google conspiracy theories

Microdoc News have a poorly researched story suggesting that Google have been engineering their search results to favour their own properties:

[... 582 words]

Installing PySQLite

Techno Weenie has a detailed guide to setting up PySQLite on boxes you don’t have root access to. SQLite looks ideal for small to medium sized applications so I can see this being really useful should I ever write something that uses it.

[... 48 words]


My new favourite toy is SQLObject, an object-relational mapper which makes heavy use of Python’s special method names to create objects which can be used to transparently access and modify data in a relational database. I tried to write something like this in PHP once before and failed miserably, but SQLObject has such an elegant design that I’m just annoyed I didn’t find out about it sooner. Here’s some example code, adapted from the SQLOBject site:

[... 249 words]


Python as middleware Python Power: Growing Respect for an Open Source Integration Tool. Another excellent piece of Python advocacy, this time highlighting Python’s power and flexibility as a middleware tool to glue together varous large enterprise systems.

[... 36 words]

Object persistence

Simon Brunning talks about persistence, and how much more complicated it is now that objects are involved. The best explanation I’ve seen of how objects and relational databases can be used together was in Martin Fowler’s Patterns of Enterprise Application Architecture, but now that the book has been published he has removed the online version. IBM’s DeveloperWorks has a new article up describing persistence management in Python, which talks in details about Python’s native serialization method (pickling) but only mentions ZODB in passing. I agree with Simon—object databases just don’t seem as elegant a solution as RDBMSs. Object databases may provide persistence but they don’t seem nearly as powerful as relational databases when it comes to flexibility of accessing data.

[... 141 words]

Linux Gazette Python articles

Linux Gazette has a couple of interesting Python articles at the moment. Dealing with User Input in Python is a beginners guide to validating user input, while Pl/Python and Cursors in Pl/Pgsql for PostgreSQL explains how Python can be used to write stored procedures in PostgreSQL.

[... 48 words]

PythonCard scriptlets

Kevin Altis on scripting applications written in PythonCard:

[... 334 words]

Python e-mail features

Python 2.2.2 is out. It’s mostly bug fixes, but they have also included the latest version of the Python email package. I’ve been playing with Python’s email features recently as part of an experimental idea to import all of my mail (from various accounts) in to a mySQL database and build my own web mail / mail application program. Working with email in Python is beautfully simple, thanks to the aforementioned email package and the powerful pop3 and IMAP classes in the standard library.

[... 88 words]

mod_python donated to the ASF

mod_python has been donated to the Apache Software Foundation. This is excellent news—I have always been slightly wary of mod_python as it has a reputation for being unstable, but with the ASF directly supporting it hopefully any stability problems will soon be a thing of the past.

[... 51 words]

effnews part two

Fetching and Parsing RSS Data is the second installment of the effnews project, a series of tutorials on creating an RSS news reader in Python. This time topics covered include exception handling and event based XML parsing using xmllib.

[... 122 words]

Python RSS tutorials

Spotted on Python owns us: Fredrik Lundh is building an RSS newsreader in Python, and writing Python tutorials on the project as he goes along. The first tutorial, Fetching RSS Files, is available now and covers (in detail) retrieving RSS files over the web, including an excellent explanation of asynchronous HTTP requests.

[... 65 words]

Python RSS locator

Mark Pilgrim has written an ultra-liberal RSS locator (in Python, naturally). I guess he had to scratch an itch. The amount of work it puts in to locating an RSS feed for a site is astonishing, especially when you consider how short the actual code is.

[... 50 words]

Another free Python book

How to Think Like a Computer Scientist: Learning with Python is a new Python text book covered by the GNU Free Documentation License and available on the web. The thread discussing it on Slashdot gives mixed reviews, with other recommended free alternatives including Mark Pilgrim’s Dive Into Python and Thinking in Python by Bruce Eckel.

[... 66 words]

Windows SSL support in Python

Adding SSL support to Python on Windows is as easy as dropping a couple of DLLs and a .pyd file in to your Python DLLs directory. Grab the zip file from this page and off you go. I haven’t tried it out yet but it appears to work—the socket.ssl function miraculously appeared when I installed the new files. Why is this useful? Because it opens the way for secure XML-RPC calls from Python applications...

[... 95 words]

PythonCard and PyCrust

Patrick O’Brien: Building GUI Applications with PythonCard and PyCrust. I’m a big fan of PythonCard, an excellent toolkit for creating GUI applications in Python that seperates the GUI layout from the program logic and makes it ridiculously easy to put together a basic GUI in a short space of time. Patrick is the developer of PyCrust, an interactive shell for debugging and interacting with GUI components, and is also a contributor to PythonCard as a whole. Patrick and Kevin Altis, the lead developer of PythonCard, will be presenting a session on PythonCard at OSCON on Thursday.

[... 104 words]

Fun with Amazon

There’s plenty of activity surrounding Amazon web services today. My limited demo barely scratches the surface of the possibilities—people are already experimenting with Amazon’s similarity search and Mark Pilgrim has released PyAmazon, a Python wrapper for the Amazon API. I’ve started listing alternative implementations on the PHP Amazon Search page, and I’ll be sure to blog the more innovative examples as and when I find them.

[... 79 words]

Python in PHP

Python in PHP (via HarryF on the SitePoint Forums):

[... 123 words]