On Wed, Jan 27, 2010 at 03:19:21PM +0100,
Denis Bitouzé <dbitouze(at)wanadoo(dot)fr> wrote
a message of 34 lines which said:
> Je souhaiterais pouvoir récupérer le résultat d'une requête sous son
> formatage habituel,
Pourquoi ne pas utiliser les mécanismes de formatage de Python, comme
le paquetage formatter <http://docs.python.org/library/formatter.html>
ou <http://docs.python.org/library/string.html> ?
> Dans un script bash, cela se fait aisément en utilisant l'interface à
> PostgreSQL en ligne de commandes qu'est psql. Mais cela est-il possible
> directement en python ?
Ben, exactement de la même façon, en appelant psql.
http://docs.python.org/library/subprocess.html