One of the ideas I most gleefully stole from YASQL for sqlpython is special terminators, sequences like
\g
and \c
that replace a SELECT statement's ending semicolon. When a query ends with a special terminator, the output is specially formatted: \c
gives CSV, \h
gives HTML, \t
gives transposed (columns as rows / rows as columns), etc. Type help terminators
for details.sqlpython 1.5.0 is out today, with the most demented special output format yet: CHARTS! Instant ad-hoc grapical goodness direct from your query, no tedious mucking around in spreadsheets or exporting to another program. Just terminate your query with \l (line graph), \L (scatter graph - no lines), \p (pie chart), or \b (bar graph).
Also, as of 1.5.0, it's pretty easy to define your own special terminators and formats. Just install sqlpython in uncompressed form (easy_install -UZ will do that), open up output_templates.py, and follow the pattern.