The reality of Stefan Scholl

"I hope there's pudding"

Batteries included

The imports of a current project at work:

$ grep -h import *.py|sort -u
from __future__ import with_statement
from cStringIO import StringIO
from ftplib import FTP
from xml.etree import ElementTree
import ConfigParser
import csv
import glob
import logging, logging.handlers
import os
import sys
import time
import traceback
import zipfile

Small program (500 lines, w/o empty lines and comments), but a lot of things get done.

You don't have to download and install a single additional library for this. Everything is included in the standard distribution of Python 2.5. "Batteries Included", they call it. And it fits.

I know, this isn't unique to Python. But it's seldom enough in the programming language world to be mentioned. And it's not only quantity. The libraries are very usable and have most of the features you need. It was possible to generate some data from multiple XML files and send it in a ZIP archive to a ftp server - all without generating any real files in the local filesystem.

Tags: Praise, Python