MySQL, Python, NumPy and formatted read

Ian Hoffman ith140 at gmail.com
Sun May 23 18:30:25 EDT 2010


Hello,

I'm having significant Python difficulties (and I'm new to Python).
I'm trying to read BLOB ASCII (numerical) data from a MySQL database
using MySQLdb in a formatted fashion.  The BLOB data is a sequence of
numbers separated by newlines (\n), like this:
5
6
10
45
etc.

When I read the data using the fetchone() command I get a single
tuple.  What I'd like is to somehow put the tuple into a NumPy array
with each value as one element.  Then I can continue to do some
numerical processing.

Any advice/help?




More information about the Python-list mailing list