[PD] MySql database accessing with PureData ?

Thomas Grill t.grill at gmx.net
Wed Dec 17 16:25:11 CET 2003

> Hello Thomas,
> Unfortunately i don't know anything about python excepted that i should
> learn it !
> Could you give me an estimation of the time needed by a newbie to script
> a MySql reader for pd ?

MySQL-Python modules can be found here:
and examples are given in



# import MySQL module
import MySQLdb

# connect
db = MySQLdb.connect(host="localhost", user="joe",

# create a cursor
cursor = db.cursor()

# execute SQL statement
cursor.execute("SELECT * FROM animals")

# get the resultset as a tuple
result = cursor.fetchall()

# iterate through resultset
for record in result:
        print record[0] , "-->", record[1]


For simplicity you should probably start with py (instead of pyext) - have a
look at the examples.

best greetings,

More information about the Pd-list mailing list