Re: [Tutor] pgdb and console output

2010-03-11 Thread pylist1
On Wed, 10 Mar 2010, Alan Gauld wrote: "pylist1" wrote Yes, stdout.write has no formatting if you need spaces or newlines you have to explicitly provide them. Got it. See the Talking to the User topic in my tutorial for more detail on the differences. OK I will check that out. Thanks

Re: [Tutor] pgdb and console output

2010-03-10 Thread Alan Gauld
"pylist1" wrote sys.stdout.write(str(i)) Yes that does indeed work like this: But it leaves formatting issues with leaving the command prompt in the middle of the screen. That's not an issue at the moment. Yes, stdout.write has no formatting if you need spaces or newlines you have to exp

Re: [Tutor] pgdb and console output

2010-03-09 Thread pylist1
On Mon, 8 Mar 2010, Alan Gauld wrote: "hithere there" wrote #! /usr/bin/env python import pgdb, sys db = pgdb.connect (dsn='192.168.0.1:familydata', user='postgres', password='') cursor = db.cursor () cursor.execute ("select * from names") rows = cursor.fetchall () for i in (ro

Re: [Tutor] pgdb and console output

2010-03-07 Thread Alan Gauld
"hithere there" wrote #! /usr/bin/env python import pgdb, sys db = pgdb.connect (dsn='192.168.0.1:familydata', user='postgres', password='') cursor = db.cursor () cursor.execute ("select * from names") rows = cursor.fetchall () for i in (rows): print i #viewtable (db) No idea what

[Tutor] pgdb and console output

2010-03-07 Thread hithere there
OS = RHEL 5.4 32Bit Python = 2.4.3 #! /usr/bin/env python import pgdb, sys db = pgdb.connect (dsn='192.168.0.1:familydata', user='postgres', password='') cursor = db.cursor () cursor.execute ("select * from names") rows = cursor.fetchall () for i in (rows): print i #viewtable (db) #