sholden at holdenweb.com
Fri Nov 16 16:51:30 CET 2001
[posted & mailed]
----- Original Message -----
From: "Gustavo Campanelli" <gcampanelli at ciudad.com.ar>
Sent: Friday, November 16, 2001 9:21 AM
This is a really newbie question, I just started with Python 3 days ago,
I´m finding it quite fascinating. I don´t know how this works for you,
usually learn faster when I´m trying programs, and programs come out
when I´m actually doing something and not only trying to test a comand.
I´m trying to access a database from python. Where should I look for
documentation about using python as interface for MySQL or PostgreSQL?
course, that is under Linux.
----- End Original Message -----
No "of course" about it ... I currently use MySQL (with Python) under
Windows, and it's excellent. I understand that PostgreSQL has also been
ported. However ...
You first need to understand the Python DB API, as most useful database
modules try to confirm with this. The DB Sig's pages at
http://www.python.org/sigs/db-sig/ include a database topic guide which
references this. If it all seems too complicated, then go seek out some
sample database code in Python. One such can be seen at
and you can find lots of others by visiting www.google.com and entering
a search string such as "Python MySQLdb example code" or something
"MySQLdb" is a crucial resource for you, since this is the module you
will need to download and install to provide MySQL support. (There's
also MyODBC, but that will represent unnecessary complexity when you are
starting out). The DB SIG pages should link you to where you can
download that module.
After that, comp.lang.python is one of the friendlier newsgroups, and
further questiosn will usually elicit a helpful response. It helps to
know what you're talking about, but even when you don't you rarely
require the "asbestos underwear"!
Good luck with MySQL!
More information about the Python-list