Hello, I tried to find an external which could allow me to accesss MySql database with pd but i failed. Is there someone who knows how could i accomplish this task ?
Best salutations,
Jean Jacques http://tecfa.unige.ch/perso/staf/duclaux/blog/
Hi Jean Jacques, if you want to do some Python programming i'm pretty sure that py/pyext with the respective import modules should do it... best greetings, Thomas
----- Original Message ----- From: "Jean Jacques" jj@wanadoo.fr To: pd-list@iem.at Sent: Wednesday, December 17, 2003 1:53 PM Subject: [PD] MySql database accessing with PureData ?
Hello, I tried to find an external which could allow me to accesss MySql database with pd but i failed. Is there someone who knows how could i accomplish this task ?
Best salutations,
Jean Jacques http://tecfa.unige.ch/perso/staf/duclaux/blog/
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
Thomas Grill wrote:
Hi Jean Jacques, if you want to do some Python programming i'm pretty sure that py/pyext with the respective import modules should do it... best greetings, Thomas
----- Original Message ----- From: "Jean Jacques" jj@wanadoo.fr To: pd-list@iem.at Sent: Wednesday, December 17, 2003 1:53 PM Subject: [PD] MySql database accessing with PureData ?
Hello, I tried to find an external which could allow me to accesss MySql database with pd but i failed. Is there someone who knows how could i accomplish this task ?
Best salutations,
Jean Jacques http://tecfa.unige.ch/perso/staf/duclaux/blog/
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
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 ?
Thanks,
Jean Jacques http://tecfa.unige.ch/perso/staf/duclaux/blog
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: http://www.mysql.com/downloads/api-python.html and examples are given in http://www.devshed.com/Server_Side/Python/PythonMySQL/print_html
#!/usr/bin/python
# import MySQL module import MySQLdb
# connect db = MySQLdb.connect(host="localhost", user="joe", passwd="secret",db="db56a")
# 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, Thomas
I read:
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 ?
I did some pyext/mysql stuff if you want I can dig it out and probably help you to tailor it to suit your needs.
regards,
x
CK wrote:
I read:
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 ?
I did some pyext/mysql stuff if you want I can dig it out and probably help you to tailor it to suit your needs.
regards,
x
Hello,
Thank you very much for your help, i really do appreciate ! As i won't have enough time to dig into python scripting, i'm going to use php and SVG instead of pd.
But as i really want to be able to use MySql with pd i'll try later to solve this problem.
All the best,
Jean Jacques http://tecfa.unige.ch/perso/staf/duclaux/blog/
Hi all,
It turns out we had a similar problem and Mathieu was kind enough to add a mysql object to GridFlow. It is not a standard object so you will have to add it to a .gridflow_startup file. See the relevant files here :
mysql.pd .gridflow_startup
http://artengine.ca/~tiki/tiki-list_file_gallery.php?galleryId=14
Cheers,
Alexandre
On Wednesday 17 December 2003 11:34, Jean Jacques wrote:
CK wrote:
I read:
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 ?
I did some pyext/mysql stuff if you want I can dig it out and probably help you to tailor it to suit your needs.
regards,
x
Hello,
Thank you very much for your help, i really do appreciate ! As i won't have enough time to dig into python scripting, i'm going to use php and SVG instead of pd.
But as i really want to be able to use MySql with pd i'll try later to solve this problem.
All the best,
Jean Jacques http://tecfa.unige.ch/perso/staf/duclaux/blog/
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
On Fri, 26 Dec 2003, Alexandre Castonguay wrote:
It turns out we had a similar problem and Mathieu was kind enough to add a mysql object to GridFlow. It is not a standard object so you will have to add it to a .gridflow_startup file.
Hi. Since it's to be put in a .gridflow_startup file it's not "added to GridFlow" but rather "written for GridFlow".
It's written for GridFlow because part of GridFlow is to the Ruby language what PyExt is to Python.
However, just as one written in Python would require a mysql-for-python module, you will need a mysql-for-ruby with mine. You may download that at:
http://raa.ruby-lang.org/list.rhtml?name=mysql-ruby
Mathieu Bouchard http://artengine.ca/matju
Thank you very much for your help !
Best regards,
Jean Jacques http://tecfa.unige.ch/perso/staf/duclaux/blog/
Mathieu Bouchard wrote:
On Fri, 26 Dec 2003, Alexandre Castonguay wrote:
It turns out we had a similar problem and Mathieu was kind enough to add a mysql object to GridFlow. It is not a standard object so you will have to add it to a .gridflow_startup file.
Hi. Since it's to be put in a .gridflow_startup file it's not "added to GridFlow" but rather "written for GridFlow".
It's written for GridFlow because part of GridFlow is to the Ruby language what PyExt is to Python.
However, just as one written in Python would require a mysql-for-python module, you will need a mysql-for-ruby with mine. You may download that at:
http://raa.ruby-lang.org/list.rhtml?name=mysql-ruby
Mathieu Bouchard http://artengine.ca/matju
Hallo, Jean Jacques hat gesagt: // Jean Jacques wrote:
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 ?
This very much depends on how comfortable and experienced you are with programming. I learned the basics of Python in about an afternoon, and I was only slightly experienced in Perl at that time. Start with Guido van Rossums Python tutorial, it's a short read and lots of fun, too.
For Database access I would highly recommend using SQLObject from http://sqlobject.org/, which is a wrapper around several databases. It makes getting started with database programming in Python *very* fast.
This is a complete DB app in Python:
# start from SQLObject import *
__connection__ = MySQLConnection( host='localhost', db='sqlobject_test', user='sqlobject_test', passwd='sqltest')
class Person(SQLObject):
firstName = StringCol(length=100)
middleInitial = StringCol(length=1, default=None)
lastName = StringCol(length=100)
if __name__ == "__main__": Person.createTables() msp = Person.new("Miller", "S", "Puckettte") print "%s wrote Pd" % msp.lastName print "Oops, spelling error!" msp.lastName = "Puckette" print msp
# end
After that, msp is correctly saved in the Database, because all DB-actions are transparent and automatically written or read when accessing the attributes like "msp.lastName"
Frank Barknecht _ ______footils.org__
[sqlsingle] was written for PostgreSQL, but I don't think its been
updated in a while:
http://www.reverberant.com/PD/
.hc
On Wednesday, Dec 17, 2003, at 13:53 Europe/Brussels, Jean Jacques
wrote:
Hello, I tried to find an external which could allow me to accesss MySql
database with pd but i failed. Is there someone who knows how could i accomplish this task ?Best salutations,
Jean Jacques http://tecfa.unige.ch/perso/staf/duclaux/blog/
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
"[W]e have invented the technology to eliminate scarcity, but we are
deliberately throwing it away
to benefit those who profit from scarcity."
-John Gilmore
There is "sqlsingle" on the net somwhere, I think its meant for postgres, but it may be easy to modify.
B. ----- Original Message ----- From: "Jean Jacques" jj@wanadoo.fr To: pd-list@iem.at Sent: Wednesday, December 17, 2003 7:53 AM Subject: [PD] MySql database accessing with PureData ?
Hello, I tried to find an external which could allow me to accesss MySql database with pd but i failed. Is there someone who knows how could i accomplish this task ?
Best salutations,
Jean Jacques http://tecfa.unige.ch/perso/staf/duclaux/blog/
PD-list mailing list PD-list@iem.at http://iem.at/cgi-bin/mailman/listinfo/pd-list
Hallo, Marc Lavallée hat gesagt: // Marc Lavallée wrote:
On Wed, Dec 17, 2003 at 10:51:50AM -0500, B. Bogart wrote:
There is "sqlsingle" on the net somwhere, I think its meant for postgres, but it may be easy to modify.
I'd like a SQLite external... (that would be a really cool project).
Works with pyext, and if you use SQLObject as I suggested, you could even use the same code for it, as you'd use for MySQL, PostgreSQL, Firebird, DBM-files, ...
But of course an external would be nice, too, although the string handling in Pd is a bit, well, orthogonal to SQL.
Frank Barknecht _ ______footils.org__
On Wed, Dec 17, 2003 at 08:07:47PM +0100, Frank Barknecht wrote:
I'd like a SQLite external... (that would be a really cool project).
Works with pyext, and if you use SQLObject as I suggested, you could even use the same code for it, as you'd use for MySQL, PostgreSQL, Firebird, DBM-files, ...
What I like about SQLite is that it uses local database files without a server, it's very fast, and the static library is small enough to be linked to the external (~350K), for easy distribution of projects, including the external and the databases. For Windows, there's a SQLite DLL.
But of course an external would be nice, too, although the string handling in Pd is a bit, well, orthogonal to SQL.
For simple SQL commands and data types, that's not a problem, and it should also be possible to save audio data in a database, for example.
-- Marc