import pg db = pg.DB('bind9', '192.168.192.2', 5432, None, None, 'named', None) db.query('create temp table fffz(i int,t text)') db.query('copy fffz from stdin') db.putline("3\t'the'") db.putline("4\t'rain'") db.endcopy() db.query('commit')
Note that multiple columns must be separated by tabs ('\t') (unless you specify "copy mytable with delimiter ..."). -- http://mail.python.org/mailman/listinfo/python-list