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
"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
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
"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
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)
#