[scribus] Python MySQLdb

Jean Mielot j.mielot at gmail.com
Fri Jan 13 10:52:00 UTC 2012


Hi

I've been experimenting with Python and MySQLdb.

Previously I worked with Indesign and a custom CMS to import magazine 
articles via XML.
Scribus and Python I see allows me to link directly to the DB - which is 
fantastic.

However for the life of me I can't seem to get a grip on the MySQLdb API.

I am trying to fetch a record from the db, but I am uncertain of the syntax.

I've tried this:

cur.execute("""SELECT text FROM table WHERE id=8""")

But this does not seem to work.
I'm not exactly sure how fetchone() and fetchall() works in this case.

Can anyone enlighten me?

Thanks








More information about the scribus mailing list