From: Dave S. <Dst...@em...> - 2002-06-13 01:57:18
|
That's exectly what I needed - Thanks! "from pyPgSQL import PgSQL" ahhh...... Dave Strickler CEO DWS - "The GroupWise Integration Experts" Boston * Austin * Belgium * Denmark http://www.emailsolutions.com (800) 999-5412 x10 ------------------------------------ Want to get rid of SPAM, Viruses, and unwanted content? MailWise Filter - "The E-Mail Firewall (tm) for Your Company" See http://www.emailsolutions.com/MailWise >>> Michael Watkins <wa...@tr...> 06/12/02 09:43PM >>> Close... from pyPgSQL import PgSQL dsn = 'dbname=yourdb user=youruser host=yourhost' db = PgSQL.connect(dsn) cursor = db.cursor() and now... cursor.execute("select * from something") result = cursor.fetchall() for row in result: print row.acolumn, row.anothercolumn happy experimenting... Mike At 09:30 PM 6/12/2002 -0400, Dave Strickler wrote: >You're gonna think I'm whacko, but actually, I have read those docs. What >I'm missing, is what do I load ( I think its "import PgSQL") so that I can >use the connect command etc. > >When I start up Python, it doesn't understand any of the pypgsql commands, >and I assume that's b/c I need to load a library... |