On 7/6/11 12:18 AM, Gordon wrote:
I want to make a module that has the ability to access a remote MySQL
database from within Sage (on a read-only basis)
Essentially I want Python and/or Sage versions of the various
mysql_connect(), mysql_query() etc commands that you get from
languages like PHP or even good old C.
Sage does not include the Python MySQLdb module in its distribution,
and so I assume that this is NOT the recommended way to approach this
task.
I *do* see that Sage includes sqlalchemy which I guess is some sort of
database abstraction layer, but the version included with Sage is out-
of-date, which makes me feel that this is ALSO not the recommended
way.
I also suspect that this is not really the right group to ask this
question, but I am rather overwhelmed with the mass of unconnected
documentation, wikis, forums etc so I thought I would start here and
hope to get pointed in the right direction....
Probably the "right" python answer is to use sqlalchemy. If you're more
ambitious, then upgrade your copy of sqlalchemy in Sage:
download sqlalchemy and extract it
instead of doing python setup.py install, do "sage -python setup.py install"
If you're even more ambitious, we'd love to have an upgraded sqlalchemy
spkg!
Jason
--
Jason Grout
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org