Re: MySQL, Python, NumPy and formatted read

2010-05-26 Thread John Nagle
Ian Hoffman wrote: 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.

Re: MySQL, Python, NumPy and formatted read

2010-05-24 Thread Ian Hoffman
On May 24, 2:11 am, Dennis Lee Bieber wrote: > On Sun, 23 May 2010 21:44:30 -0700 (PDT), Ian Hoffman > declaimed the following in gmane.comp.python.general: > > > The problem is the tuple is contained in a single value separated by > > newlines (only a[0] has a record), otherwise I could do as yo

Re: MySQL, Python, NumPy and formatted read

2010-05-23 Thread Ian Hoffman
On May 23, 6:54 pm, Matteo Landi wrote: > I know anything about mysqldb and fetchone method, but it's easy to > create a numpy array, given a tuple of data: > > > > >>> import numpy > > >>> t = ('1', '2', '3') > >>> numpy.array(t, int) > array([1, 2, 3]) > > I made the assumption that mysqldb.fetc

Re: MySQL, Python, NumPy and formatted read

2010-05-23 Thread Matteo Landi
I know anything about mysqldb and fetchone method, but it's easy to create a numpy array, given a tuple of data: >>> import numpy >>> >>> t = ('1', '2', '3') >>> numpy.array(t, int) array([1, 2, 3]) >>> I made the assumption that mysqldb.fetchone return a tuple of strings, so we need to create an

Re: MySQL-python-1.2.2 install with no mysql

2008-01-15 Thread washakie
Thank you... after: %yum install mysql* I was able to build and install mysql-python -- View this message in context: http://www.nabble.com/MySQL-python-1.2.2-install-with-no-mysql-tp14836669p14845579.html Sent from the Python - python-list mailing list archive at Nabble.com. -- http://ma

Re: MySQL-python-1.2.2 install with no mysql

2008-01-15 Thread Jarek Zgoda
washakie napisał(a): > Okay, I've installed mysql then using yum... it installed the same version > running on another machine with identical python where all works well... but > now I get this error during build... thoughts?!?? mysql_config is there, and > the site.cfg file is pointing correctly t

Re: MySQL-python-1.2.2 install with no mysql

2008-01-15 Thread washakie
Okay, I've installed mysql then using yum... it installed the same version running on another machine with identical python where all works well... but now I get this error during build... thoughts?!?? mysql_config is there, and the site.cfg file is pointing correctly to it... : [root@ MySQL-pyth

Re: MySQL-python-1.2.2 install with no mysql

2008-01-15 Thread Jarek Zgoda
washakie napisał(a): > I need to install the MySQL-python-1.2.2 connector in order to access a db > on another machine. In the install it asks for the location of the > mysql_config file, and if I leave it as the default I get: > > [EMAIL PROTECTED] MySQL-python-1.2.2]# python setup.py build > sh

Re: MySQL-python Error

2007-12-30 Thread godavemon
Hopefully you've found it by now and didn't have a frustrating christmas :). Get the source from sourceforge and then follow the instructions here. http://www.davidcramer.net/code/57/mysqldb-on-leopard.html Worked perfectly for me on OSX 10.5, python 2.5. Was frustrating to find. Good luck!

RE: MySQL -->Python-->XML for JSviz

2007-07-03 Thread Sells, Fred
Sometimes sneaky is better than elegant. You could shell down to a command line invocation of mysql and specify -xml as the output format. I'm not sure how close that format is to what you need or how much you could leverage views (if using mysql 5.0). You could also use a command line xslt proce

Re: MySQL-python-1.2.1_p2, Python 2.5 and OS X Tiger

2006-12-08 Thread scum
And I know about the precompiled binary... I'm just sick of getting this warning Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import _mysql __main__:1: RuntimeWa

Re: MySql -Python question

2006-04-24 Thread Steve Holden
[EMAIL PROTECTED] wrote: > both of your suggestions don't work, that's kind of what I was trying > the whole time > Well it seems firly obvious that your universe is somehow broken. Please send it back to God in a plain wrapper and it will be replaced with a new universe in which all programming

Re: MySql -Python question

2006-04-24 Thread Frank Millman
[EMAIL PROTECTED] wrote: > both of your suggestions don't work, that's kind of what I was trying > the whole time I am sure you have read this before somewhere, but - 1. Tell us what you have tried so far 2. Tell us what you expected (or hoped) would happen 3. Tell us what actually h

Re: MySql -Python question

2006-04-24 Thread ataanis
both of your suggestions don't work, that's kind of what I was trying the whole time -- http://mail.python.org/mailman/listinfo/python-list

Re: MySql -Python question

2006-04-24 Thread Vladimir 'Yu' Stepanov
Dennis Lee Bieber wrote: > On 23 Apr 2006 21:25:48 -0700, [EMAIL PROTECTED] declaimed the following > in comp.lang.python: > > >> Hey all, I'm running a query within some python code, and I'm having >> difficulties doing something that seems to be really simple . I'm >> running a query in the fo

Re: MySql -python 1.2.1_p2 and visual c++ toolkit

2006-04-17 Thread simen . haugen
I tried mxODBC now, and it worked out of the box. Thanks for the tip! -- http://mail.python.org/mailman/listinfo/python-list

Re: MySql -python 1.2.1_p2 and visual c++ toolkit

2006-04-17 Thread BartlebyScrivener
I'm pretty new myself. But if you don't get anywhere using mysql-python, I can recommend mxODBC. I have connected to both MS Access DB and MySQL DB. You get it from: http://www.egenix.com/files/python/mxODBC.html But read the instructions carefully as I think there are two things to install. If

Re: MySQL & Python

2005-09-20 Thread Steve Holden
Ed Hotchkiss wrote: > Just migrating now from ASP/to MySQL and Python. > > I am trying to create a simple script to access a MySQL DB. > The Module for MySQL looks very easy, however I do not understand one > thing ... > > In ASP, you can just create a new DB with Access. In MySQL, how do I >

Re: MySQL & Python

2005-09-15 Thread Peter Decker
On 9/15/05, Ed Hotchkiss <[EMAIL PROTECTED]> wrote: > I am trying to create a simple script to access a MySQL DB. > The Module for MySQL looks very easy, however I do not understand one thing > ... > > In ASP, you can just create a new DB with Access. In MySQL, how do I create > a database to

Re: MySQL & Python

2005-09-15 Thread Jaime Wyant
Connect to the database as root. create database databasename; Now grant priveleges accordingly: grant all on databasename to super_user; (I may have the grant syntax screwed up, but you get the idea.) jw On 9/15/05, Ed Hotchkiss <[EMAIL PROTECTED]> wrote: > Just migrating now from ASP/to My

Re: MySQL-python-1.0.0.win32-...

2004-12-06 Thread Michel Claveau - abstraction méta-galactique non triviale en fuite perpétuelle.
+1 -- http://mail.python.org/mailman/listinfo/python-list