PyGreSQL difficulties (Sorry and thanks)

Jim Driese jdriese at seanet.com
Sun Oct 10 23:52:20 EDT 1999


I was somewhat embarrassed about a couple of recent posts I made which served
mostly to inform the Python community of my complete ignorance of SQL.
Anticipating flames, I logged on only to find three thoughtful responses to my
queries -- two via email.  Thanks to everyone who took the time to respond; I now
know enough about SQL to finish my program.

What a fine programming language Python is!  I used to be an avid Lisp programmer
but it doesn't show much promise for rapid prototyping and CGI programming.  While
I have made peace with Perl, its syntax still scares me.

Regards,

Jim Driese



"D'Arcy J.M. Cain" wrote:

> Jim Driese <jdriese at seanet.com> wrote:
> > I'm new to Python and am trying to get the PyGreSQL module to work

[deleted]

> Just so you know, the whole demo area has not received as much attention
> as it should so don't be too surprised if there are some rough edges
> here and there.
>
> > cnx = basics.DB(...)
>
> > [deleted]
>
> You need to replace the elipsis with whatever args you need to connect to
> a database.  See the README for details on the connect() call which takes
> the same arguments as the DB class.  The init function in DB just calls
> connect with the args given.  For example, if you are opening a database
> on the local machine with the name matching your login name then you can
> just use the following.
>
> cnx = basics.DB()
>
> More commonly you would name the database here.
>
> cnx = basics.DB('mytest')
>
> and finally, here is a more complicated example.
>
> cnx = basics.DB('mytest', 'db.otherdomain.com', user = 'guest', passwd = 'abc')
>
> --
> D'Arcy J.M. Cain <darcy at caingang.com>      |  Democracy is three wolves
> http://www.druid.net/darcy/                |  and a sheep voting on
> +1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.





More information about the Python-list mailing list