<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>MySQL Forums - Python</title>
        <description>Forum for MySQL and Python.</description>
        <link>http://forums.mysql.com/list.php?50</link>
        <lastBuildDate>Fri, 24 May 2013 10:55:44 +0000</lastBuildDate>
        <generator>Phorum 5.2.19</generator>
        <item>
            <guid>http://forums.mysql.com/read.php?50,586983,586983#msg-586983</guid>
            <title>sys_exec ()  can run a python program (no replies)</title>
            <link>http://forums.mysql.com/read.php?50,586983,586983#msg-586983</link>
            <description><![CDATA[ hello,<br />
<br />
for  test reasons, I have a python program who writes to a file. txt date and the current time.<br />
<br />
<br />
 select  sys_exec('python /var/test/script/aa.py');<br />
<br />
I gave  chown mysql:mysql aa.py  and chmod 777 aa.py<br />
<br />
result is:<br />
+-------------------------------------------+<br />
| sys_exec('python /var/test/script/aa.py') |<br />
+-------------------------------------------+<br />
|                                         0 |<br />
+-------------------------------------------+<br />
1 row in set (0.23 sec)<br />
<br />
<br />
<br />
but nothing appears in the text file<br />
<br />
will you give me some suggestions please?<br />
<br />
thanks]]></description>
            <dc:creator>Luca Lucchesi</dc:creator>
            <category>Python</category>
            <pubDate>Tue, 21 May 2013 14:39:24 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,585759,585759#msg-585759</guid>
            <title>MySQL TRIGGER and python (1 reply)</title>
            <link>http://forums.mysql.com/read.php?50,585759,585759#msg-585759</link>
            <description><![CDATA[ Hello,<br />
I'm trying to understand how the MySQL TRIGGER work and if they can be useful for my purpose.<br />
<br />
I would like to monitor the UPDATE of data in a table.<br />
trying to print on screen   the changed data and all  the line pertaining to.<br />
<br />
could I have an example of TRIGGER and python?<br />
<br />
Thank you very much<br />
<br />
Luca]]></description>
            <dc:creator>Luca Lucchesi</dc:creator>
            <category>Python</category>
            <pubDate>Thu, 09 May 2013 14:37:01 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,585088,585088#msg-585088</guid>
            <title>INSERT with SELECT (1 reply)</title>
            <link>http://forums.mysql.com/read.php?50,585088,585088#msg-585088</link>
            <description><![CDATA[ Hi,<br />
<br />
I run a python program which takes a flat log file as input to load it into a database in order for administrators to monitor their application.<br />
<br />
I have five tables : server table with two columns (id and name), status table with two columns, directive table with two columns, rule table with two columns and finally a server_status_directive_rule table with five columns (id_server, id_status, id_directive, id_rule, date).<br />
<br />
I can easily insert into the first four tables.<br />
My problem is with trying to insert a variable into the fifth table.<br />
The code is :<br />
&lt;code&gt;<br />
query = &quot;&quot;&quot;INSERT INTO serveur_etat_directive_regle (id_serveur, id_etat, id_directive, id_regle, date)<br />
SELECT id_serveur, id_etat, id_directive, id_regle, %s FROM serveur, etat, directive, regle<br />
WHERE nom_serveur = %s AND nom_etat = %s AND nom_directive = %s AND nom_regle = %s&quot;&quot;&quot;<br />
cursor.execute(query, (serveur, etat, directive, regle, date,))<br />
&lt;/code&gt;<br />
<br />
The problem is with the date column. If I remove it from my INSERT and subsequently in the SELECT and cursor.execute, the table is filled in properly.<br />
<br />
The other thing to know is I have no error message returned although I do manage error messages. My python code runs with no messages and my table is still empty at the end.<br />
<br />
The complete SQL code is below :<br />
&lt;code&gt;<br />
     try:<br />
            # accès et mise à jour de la BDD<br />
            db = mdb.connect('localhost', 'root', '', 'rudder');<br />
            cursor = db.cursor()<br />
            query = &quot;&quot;&quot;INSERT IGNORE INTO serveur (nom_serveur) VALUES (%s)&quot;&quot;&quot;<br />
            cursor.execute(query, (serveur,))<br />
            query = &quot;&quot;&quot;INSERT IGNORE INTO etat (nom_etat) VALUES (%s)&quot;&quot;&quot;<br />
            cursor.execute(query, (etat,))<br />
            query = &quot;&quot;&quot;INSERT IGNORE INTO directive (nom_directive) VALUES (%s)&quot;&quot;&quot;<br />
            cursor.execute(query, (directive,))<br />
            query = &quot;&quot;&quot;INSERT IGNORE INTO regle (nom_regle) VALUES (%s)&quot;&quot;&quot;<br />
            cursor.execute(query, (regle,))<br />
            query = &quot;&quot;&quot;INSERT INTO serveur_etat_directive_regle (id_serveur, id_etat, id_directive, id_regle, date)<br />
                    SELECT id_serveur, id_etat, id_directive, id_regle, %s FROM serveur, etat, directive, regle<br />
                    WHERE nom_serveur = %s AND nom_etat = %s AND nom_directive = %s AND nom_regle = %s&quot;&quot;&quot;<br />
            cursor.execute(query, (serveur, etat, directive, regle, date,))<br />
        except mdb.Error, e:<br />
            print &quot;Error %d: %s&quot; % (e.args[0],e.args[1])<br />
            sys.exit(1)<br />
        db.commit()<br />
&lt;/code&gt;<br />
<br />
Any help would be much appreciated.<br />
<br />
KR.]]></description>
            <dc:creator>Philippe Idlas</dc:creator>
            <category>Python</category>
            <pubDate>Wed, 01 May 2013 02:22:37 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,584793,584793#msg-584793</guid>
            <title>TypeError when inserting a date (no replies)</title>
            <link>http://forums.mysql.com/read.php?50,584793,584793#msg-584793</link>
            <description><![CDATA[ Hi,<br />
<br />
As far as I know I can insert a date into MySQL as long as the format corresponds to the date field attribute.<br />
My date column in MySQL is declared as datetime.<br />
So if I insert a date like '2013-04-21 11:29:00' into it it should work fine.<br />
Indeed when I insert using phpmysql it works but when I insert from my python programm it fails with the following error message :<br />
<br />
Traceback (most recent call last):<br />
  File &quot;C:\Users\pidlas\Documents\rudder_find.py&quot;, line 58, in &lt;module&gt;<br />
    extract(info)<br />
  File &quot;C:\Users\pidlas\Documents\rudder_find.py&quot;, line 46, in extract<br />
    cursor.execute(query, (serveur, etat, directive, regle, date,))<br />
  File &quot;C:\Python27\lib\site-packages\MySQLdb\cursors.py&quot;, line 183, in execute<br />
    query = query % db.literal(args)<br />
TypeError: not all arguments converted during string formatting<br />
<br />
I have tried different ways of formatting my python date variable but I could not until now found the right thing to do.<br />
<br />
I would appreciate any ideas or thoughts.<br />
<br />
Regards.<br />
<br />
My python code follows :<br />
<br />
# -*- coding: utf-8 -*-<br />
# modules nécessaires<br />
from os import chdir<br />
import MySQLdb as mdb<br />
import sys<br />
import datetime<br />
<br />
# variables pour la BDD<br />
serveur = ''<br />
etat = ''<br />
regle = ''<br />
directive = ''<br />
<br />
# répertoire où se trouve les logs<br />
chdir(&quot;c:/Users/pidlas/Documents/rudder/&quot;)<br />
<br />
def extract(log):<br />
    for ligne in log:<br />
        debut_date = ligne.find('[')<br />
        fin_date = ligne.find(']')<br />
        date = ligne[debut_date+1:fin_date-5]<br />
        date = datetime.datetime.strptime(date, &quot;%Y-%m-%d %H:%M:%S&quot;)<br />
        sep_N = ligne.find('N:')<br />
        serveur = ligne[ligne.find('[',sep_N)+1:ligne.find(']',sep_N)]<br />
        sep_S = ligne.find('S:')<br />
        etat = ligne[ligne.find('[',sep_S)+1:ligne.find(']',sep_S)]<br />
        sep_R = ligne.find('R:')<br />
        regle = ligne[ligne.find('[',sep_R)+1:ligne.find(']',sep_R)]<br />
        sep_D = ligne.find('D:')<br />
        directive = ligne[ligne.find('[',sep_D)+1:ligne.find(']',sep_D)]<br />
        <br />
        try:<br />
            db = mdb.connect('localhost', 'root', '', 'rudder');<br />
            cursor = db.cursor()<br />
            query = &quot;&quot;&quot;INSERT IGNORE INTO serveur (nom_serveur) VALUES (%s)&quot;&quot;&quot;<br />
            cursor.execute(query, (serveur,))<br />
            query = &quot;&quot;&quot;INSERT IGNORE INTO etat (nom_etat) VALUES (%s)&quot;&quot;&quot;<br />
            cursor.execute(query, (etat,))<br />
            query = &quot;&quot;&quot;INSERT IGNORE INTO directive (nom_directive) VALUES (%s)&quot;&quot;&quot;<br />
            cursor.execute(query, (directive,))<br />
            query = &quot;&quot;&quot;INSERT IGNORE INTO regle (nom_regle) VALUES (%s)&quot;&quot;&quot;<br />
            cursor.execute(query, (regle,))<br />
            query = &quot;&quot;&quot;INSERT INTO serveur_etat_directive_regle (serveur, id_etat, id_directive, id_regle, date)<br />
                    SELECT id_serveur, id_etat, id_directive, id_regle FROM serveur, etat, directive, regle<br />
                    WHERE nom_serveur = %s AND nom_etat = %s AND nom_directive = %s AND nom_regle = %s&quot;&quot;&quot;<br />
            cursor.execute(query, (serveur, etat, directive, regle, date,))<br />
        except mdb.Error, e:<br />
            print &quot;Error %d: %s&quot; % (e.args[0],e.args[1])<br />
            sys.exit(1)<br />
        db.commit()<br />
        <br />
    info.close()<br />
    db.close()<br />
    return logfile<br />
<br />
if __name__ == &quot;__main__&quot;:<br />
    with open('non-compliant-reports.log','r') as info:<br />
        extract(info)]]></description>
            <dc:creator>Philippe Idlas</dc:creator>
            <category>Python</category>
            <pubDate>Thu, 25 Apr 2013 09:35:24 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,584171,584171#msg-584171</guid>
            <title>import sql connector (1 reply)</title>
            <link>http://forums.mysql.com/read.php?50,584171,584171#msg-584171</link>
            <description><![CDATA[ Hi Folks<br />
<br />
I amusing Windows 7 x64, Python 3.3.1, mysql connector 1.0.9<br />
 <br />
I have tried my code line by line in the Python shell which works fine, I can import the connector and connect to the database and fetch back data, BUT when I save the code as a .py the import mysql.connector does not want to work for some reason, I do have the Path variable setup and when I installed the mySQL connector it placed the relevant files in my Python install path \Lib\site-pacakges folder.<br />
<br />
import mysql.connector #this is failing as a .py but works in the shell<br />
<br />
cnx = mysql.connector.connect(user='root', password='mypassword', host='my_ip_address', database'name_of_database') #this works in the shell<br />
<br />
cursor = cnx.cursor()<br />
<br />
I have also tried my .py with just:<br />
<br />
import mysql.connector<br />
 <br />
I get the following error:<br />
 <br />
Traceback (most recent call last):<br />
  File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1518, in _find_and_load_unlocked<br />
AttributeError: 'module' object has no attribute '__path__'<br />
 <br />
During handling of the above exception, another exception occurred:<br />
 <br />
Traceback (most recent call last):<br />
  File &quot;C:\Users\Paul\Desktop\scripts\mysql.py&quot;, line 2, in &lt;module&gt;<br />
    import mysql.connector<br />
  File &quot;C:\Users\Paul\Desktop\scripts\mysql.py&quot;, line 2, in &lt;module&gt;<br />
    import mysql.connector<br />
ImportError: No module named 'mysql.connector'; mysql is not a package<br />
<br />
<br />
<br />
I have tried the msi install and the independent install]]></description>
            <dc:creator>Paul Fenwick</dc:creator>
            <category>Python</category>
            <pubDate>Wed, 24 Apr 2013 11:42:17 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,583624,583624#msg-583624</guid>
            <title>Cannot display MySQL latin2_croation_ci characters in Python script (3 replies)</title>
            <link>http://forums.mysql.com/read.php?50,583624,583624#msg-583624</link>
            <description><![CDATA[ I am trying to apply MySQL records in a Python script. The fields I am concerned with use latin2_croatian_ci collation characters. When I try to print out the following characters,<br />
<br />
Karadžić<br />
Stanišić &amp; Simatović<br />
Boškoski &amp; Tarčulovski<br />
Đorđević<br />
Ražnatović, Željko<br />
<br />
I get only,<br />
<br />
Karadži?<br />
Staniši? &amp; Simatovi?<br />
Boškoski &amp; Tar?ulovski<br />
?or?evi?<br />
Ražnatovi?, Željko<br />
<br />
I have tried numerous strategies from both MySQL and Python. In MySQL I have tried both CONVERT and CAST in various combinations. In Python I have tried applying the unicode() function. Nothing seems to work. In Flash, I had to set the embedding to &quot;latin extended A&quot; to solve a similar problem.  In the old MySQL Query Browser, I have the same display problems when a try to display the records.<br />
<br />
Any and all tips and or clues would be appreciated.]]></description>
            <dc:creator>Paul Pikowsky</dc:creator>
            <category>Python</category>
            <pubDate>Wed, 24 Apr 2013 15:42:27 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,582303,582303#msg-582303</guid>
            <title>Question with python connector 1064 (42000): You have an error in your SQL syntax; (1 reply)</title>
            <link>http://forums.mysql.com/read.php?50,582303,582303#msg-582303</link>
            <description><![CDATA[ I have a small python program to generate following sql<br />
<br />
update AggGMDB set GMDBDIFF1 = ifnull(GMDB200603,0)- ifnull(GMDB200512,0)<br />
<br />
but it gives the following error<br />
<br />
mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''GMDBDIFF1' = ifnull('GMDB200603',0)- ifnull('GMDB200512',0)' at line 1<br />
<br />
What am I doing wrong<br />
<br />
here is a fragment of the python program<br />
<br />
count=0<br />
for column1,column2 in columns:<br />
	count +=1<br />
	print count<br />
	NewColumn = &quot;GMDBDIFF&quot; + str(count)<br />
	query = &quot;alter table AggGMDB add &quot;+ NewColumn + &quot; decimal(30,2)&quot;<br />
	cursor.execute(query)<br />
	query =&quot;update AggGMDB set %s = ifnull(%s,0)- ifnull(%s,0)&quot;<br />
	print query<br />
	print &quot;Computing the difference between %s and %s&quot; %(column1,column2)<br />
	print query %(NewColumn,column1,column2)<br />
	cursor.execute(query,(NewColumn,column1,column2))<br />
	cnx.commit()<br />
cursor.close()<br />
cnx.close()]]></description>
            <dc:creator>John Doe</dc:creator>
            <category>Python</category>
            <pubDate>Wed, 24 Apr 2013 11:11:51 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,581100,581100#msg-581100</guid>
            <title>Urgent Problem import mysql.connector (11 replies)</title>
            <link>http://forums.mysql.com/read.php?50,581100,581100#msg-581100</link>
            <description><![CDATA[ Dear Sir or Madam,<br />
I  have an urgent problem with Sublime Text2 using Python.<br />
How can I import mysql.connector to use that stuff in my PlugIn in<br />
Sublime? It's possible to use it in Python IDLE, but in Sublime Text 2<br />
it doesn't work.<br />
I look forward that you can help me.<br />
Actually I don't know where to store the library and how to install it.<br />
Maybe that's the reason.<br />
I'm new in this field and it would be awesome if you could help me.<br />
Thank you very much.<br />
Yours faithfully,<br />
Armin Karner]]></description>
            <dc:creator>Armin Karner</dc:creator>
            <category>Python</category>
            <pubDate>Tue, 12 Mar 2013 13:50:38 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,580647,580647#msg-580647</guid>
            <title>Wrong number of arguments during string formatting (1 reply)</title>
            <link>http://forums.mysql.com/read.php?50,580647,580647#msg-580647</link>
            <description><![CDATA[ Been working on a project with the MySQL connector and it's been pretty painful.  The docs don't seem to be very complete...<br />
<br />
(1) Does dict substitution work if the same value appears multiple times?  It seems not to.  For example:<br />
<br />
INSERT INTO some_table ( id, name ) VALUES ( %(id)s, %(name)s) ) ON DUPLICATE UPDATE some_table SET name = %(name)s WHERE id = %(id)s<br />
<br />
Here name is used once, though it's only in the dict once of course.<br />
<br />
This has inevitably lead to mysql.connector.errors.ProgrammingError: Wrong number of arguments during string formatting<br />
<br />
(2) Is only %s supported?  What if I'm inserting into a column that is INTEGER?  Use of %i gives the same error.  Which leads to goofy things like VALUES ( %s + 0 )]]></description>
            <dc:creator>Dan Survivalist</dc:creator>
            <category>Python</category>
            <pubDate>Tue, 12 Mar 2013 11:44:31 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,580315,580315#msg-580315</guid>
            <title>Python/Connect and Placeholders (2 replies)</title>
            <link>http://forums.mysql.com/read.php?50,580315,580315#msg-580315</link>
            <description><![CDATA[ Maybe this is too late in the evening, but this is driving me nuts.  I have an SQL statement with one placeholder:<br />
<br />
sql = (&quot;SELECT * FROM source AS s INNER JOIN bar AS B ON B.id = bar WHERE s.name = %s&quot;) <br />
<br />
cursor = conn.cursor()<br />
cursor.execute(sql, (source))<br />
<br />
I always get an SQL error:  mysql.connector.errors.ProgrammingError: 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%s' at line 1<br />
<br />
However, when I modify the where clause to take the same variable twice, it works as intended.<br />
<br />
sql = (&quot;SELECT * FROM source AS s INNER JOIN bar AS B ON B.id = bar WHERE s.name = %s OR s.name = %s&quot;) <br />
<br />
cursor = conn.cursor()<br />
cursor.execute(sql, (source, source))<br />
<br />
<br />
Anyone with an idea of what's going on?]]></description>
            <dc:creator>Shu Chow</dc:creator>
            <category>Python</category>
            <pubDate>Fri, 03 May 2013 06:50:25 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,579430,579430#msg-579430</guid>
            <title>MySQL Connector/Python (1 reply)</title>
            <link>http://forums.mysql.com/read.php?50,579430,579430#msg-579430</link>
            <description><![CDATA[ Hi,<br />
<br />
We are developing app using Python 2.6 and MySQL 5.5.3 as DAtabase Server.<br />
<br />
can any one tell where can i get MySql Connector for Python 2.6.<br />
<br />
from below post, i find python connector for 2.7,3.3 and 3.2<br />
<br />
<a href="http://forums.mysql.com/read.php?50,564290,564290#REPLY"  rel="nofollow">http://forums.mysql.com/read.php?50,564290,564290#REPLY</a><br />
<br />
I need it for Python 2.6. Till now we used 1.0.5 beta for testing. But it has a InterfaceError (error=2013) bug which was fixed in 1.0.8 according to the release notes.<br />
<br />
Let me know if any one know how to get 1.0.8 for Python 2.6]]></description>
            <dc:creator>PBL Narasimha Rao</dc:creator>
            <category>Python</category>
            <pubDate>Wed, 20 Feb 2013 17:36:15 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,579072,579072#msg-579072</guid>
            <title>mysql.connector/python vs MySQLdb (2 replies)</title>
            <link>http://forums.mysql.com/read.php?50,579072,579072#msg-579072</link>
            <description><![CDATA[ It possible a novice question. If I want to develop Python program to work with MySQL. I should use mysql.connector or MySQLdb? What's the advantage and disadvantage?]]></description>
            <dc:creator>Terence Chan</dc:creator>
            <category>Python</category>
            <pubDate>Fri, 22 Feb 2013 01:14:02 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,579032,579032#msg-579032</guid>
            <title>Load Data Infile error with local-infile option enabled (1 reply)</title>
            <link>http://forums.mysql.com/read.php?50,579032,579032#msg-579032</link>
            <description><![CDATA[ Hello,<br />
<br />
I'm trying to load a local csv file into my database with the command LOAD DATA LOCAL INFILE '/tmp/myfile.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '&quot;'<br />
<br />
I'm getting the following error.<br />
&quot;Error Code: 1148. The used command is not allowed with this MySQL version&quot;<br />
<br />
I've looked around and apparently, I need to make changes to my.cnf to allow loading LOCAL files.<br />
<br />
I've made all the changes that I've seen required and restarted the mysql server, but I still receive the same error message.<br />
<br />
Snippets of my.cnf :::<br />
[client]<br />
local-infile = 1<br />
<br />
[mysqld]<br />
local-infile = 1<br />
<br />
[mysql]<br />
local-infile = 1<br />
<br />
I can also verify that this option gets set when mysql is started because &quot;show variables&quot; returns: local_infile ON.<br />
<br />
Everything I know to check is reporting that the local-infile option is enabled, but I still get the error &quot;The used command .... &quot;.<br />
<br />
Any ideas on what else I can check?<br />
<br />
I'm running Mysql version 5.5.29 on Ubuntu Linux x64 on my local dev machine.]]></description>
            <dc:creator>Mike Magnuson</dc:creator>
            <category>Python</category>
            <pubDate>Wed, 20 Feb 2013 18:08:30 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,578823,578823#msg-578823</guid>
            <title>cursor close and db commit (2 replies)</title>
            <link>http://forums.mysql.com/read.php?50,578823,578823#msg-578823</link>
            <description><![CDATA[ Hi,<br />
<br />
I am using MySQLdb and InnoDB, appreciate anyone help to clarify following questitions:<br />
<br />
(1) When I run select sql, I use cursor.execute(sql) without db.commit(), I only use db.commit() for insert and update. Someone said to me that I should use db.commit() in select as well, is it necessary?<br />
<br />
(2) Which of following action is a good practice, (a) or (b)?<br />
    (a) Open db connect, run cursor execute(), close cursor and close the db.<br />
    (b) Open db connect for one WEB session connection to run all cursor execute,<br />
        and only close the db when a session is closed.<br />
<br />
(3) Should cursor.close() be called before db.commit(), or it does not matter?<br />
<br />
(3) For following multiple sql executions, should the cursor close for each execution or when all executions are finished? Which of following statements is correct or better practice (a) or (b), or it does not matter? <br />
<br />
(a) Close cursor for each sql execution:<br />
<br />
sql = &quot;select ....&quot;<br />
cursor.execute(sql)<br />
rows = cursor.fetchall()<br />
cursor.close()<br />
<br />
sql = &quot;insert ...&quot;<br />
cursor.execute(sql)<br />
cursor.close()<br />
db.commit()<br />
<br />
sql = &quot;select ...&quot;<br />
cursor.execute(sql)<br />
rows = cursor.fetchall()<br />
cursor.close()<br />
<br />
db.close()<br />
<br />
(b) Close cursor at last:<br />
<br />
sql = &quot;select ....&quot;<br />
cursor.execute(sql)<br />
rows = cursor.fetchall()<br />
<br />
sql = &quot;insert ...&quot;<br />
cursor.execute(sql)<br />
db.commit()<br />
<br />
sql = &quot;select ...&quot;<br />
cursor.execute(sql)<br />
rows = cursor.fetchall()<br />
<br />
cursor.close()<br />
db.close()<br />
<br />
(4) In above example, should cursor.close() be called before db.commit(), or it does not matter?<br />
<br />
Thank you.<br />
<br />
Kind regards.]]></description>
            <dc:creator>jupiter hce</dc:creator>
            <category>Python</category>
            <pubDate>Wed, 13 Feb 2013 08:20:32 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,577930,577930#msg-577930</guid>
            <title>Error while loading table with text file (2 replies)</title>
            <link>http://forums.mysql.com/read.php?50,577930,577930#msg-577930</link>
            <description><![CDATA[ I have data in a text file which I need to upload into a table. My script in python 3 and uses mysql.connector (https://launchpad.net/myconnpy) to connect to DB and execute commands. I have been able successfully use mysql.connector in past without any problems but I am facing problem in using the command that uploads file to a table. My code is as follows:<br />
<br />
def TableUpload(con2):   <br />
cur = con2.cursor()##Connect to destination server with table<br />
res_file = 'extend2'   <br />
cur.execute(&quot;TRUNCATE TABLE data.results&quot;)## Clear table before writing<br />
cur.execute(&quot;LOAD DATA LOCAL INFILE './extend2' INTO TABLE data.results FIELDS TERMINATED BY ','&quot;)<br />
<br />
The code clears the table and than try to upload data from text file to table. It successfully clears the table but generated following error while filling table:<br />
<br />
Traceback (most recent call last):<br />
File &quot;cl3.py&quot;, line 575, in &lt;module&gt;<br />
TableUpload(con2)<br />
File &quot;cl3.py&quot;, line 547, in TableUpload<br />
cur.execute(&quot;LOAD DATA LOCAL INFILE './extend2' INTO TABLE kakrana_data.mir_page_results FIELDS TERMINATED BY ','&quot;)<br />
File &quot;/usr/local/lib/python3.2/site-packages/mysql/connector/cursor.py&quot;, line 333, in execute<br />
res = self.db().protocol.cmd_query(stmt)<br />
File &quot;/usr/local/lib/python3.2/site-packages/mysql/connector/protocol.py&quot;, line 137, in deco<br />
return func(*args, **kwargs)<br />
File &quot;/usr/local/lib/python3.2/site-packages/mysql/connector/protocol.py&quot;, line 495, in cmd_query<br />
return self.handle_cmd_result(self.conn.recv())<br />
File &quot;/usr/local/lib/python3.2/site-packages/mysql/connector/connection.py&quot;, line 180, in recv_plain<br />
errors.raise_error(buf)<br />
File &quot;/usr/local/lib/python3.2/site-packages/mysql/connector/errors.py&quot;, line 84, in raise_error<br />
raise get_mysql_exception(errno,errmsg)<br />
mysql.connector.errors.NotSupportedError: 1148: The used command is not allowed with this MySQL version<br />
<br />
When I use the command for uploading file directly from terminal than it works well. It is just that command is not working from script. The error says that command is not allowed with mysql version though it works from terminal. Please suggest what mistake I am making or alternative way to achieve data upload to a table from local file.]]></description>
            <dc:creator>Atul Kakrana</dc:creator>
            <category>Python</category>
            <pubDate>Wed, 13 Feb 2013 05:14:37 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,574637,574637#msg-574637</guid>
            <title>MySQL Connector/Python Django 1.4 (1 reply)</title>
            <link>http://forums.mysql.com/read.php?50,574637,574637#msg-574637</link>
            <description><![CDATA[ Hi,<br />
<br />
I read that django support is removed. <a href="https://launchpad.net/myconnpy/+announcement/3934"  rel="nofollow">https://launchpad.net/myconnpy/+announcement/3934</a><br />
<br />
Is there a way to get the latest version working with django 1.4?<br />
<br />
Thanks, Dilip]]></description>
            <dc:creator>Dilip M</dc:creator>
            <category>Python</category>
            <pubDate>Tue, 27 Nov 2012 10:01:09 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,574416,574416#msg-574416</guid>
            <title>Create Stored Procedure using Python plugin in MySQL Workbench (no replies)</title>
            <link>http://forums.mysql.com/read.php?50,574416,574416#msg-574416</link>
            <description><![CDATA[ Good afternoon,<br />
<br />
I'm working on creating open source plugins for MySQL Workbench. <br />
<br />
I'm making some tests using the available classes for Python. I've found very usefull tutorials about creating columns and keys in tables.<br />
<br />
But what I can't really found is how to create stored procedures using the default classes. <br />
<br />
Could you help me to know how to do this?<br />
<br />
<br />
Thanks.<br />
<br />
<br />
EDIT:<br />
<br />
I asked about this in the IRC and they provide me an answer:<br />
<br />
	routine = schema.addNewRoutine(&quot;db.mysql&quot;)<br />
	routine.name = 'myroutine'<br />
	routine.sqlDefinition = sp_sql_code<br />
<br />
And this will add the SP defined in sp_sql_code to the model.]]></description>
            <dc:creator>Pedro Márquez</dc:creator>
            <category>Python</category>
            <pubDate>Thu, 22 Nov 2012 22:16:53 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,573157,573157#msg-573157</guid>
            <title>callproc() with parameter doesnt return resultset (2 replies)</title>
            <link>http://forums.mysql.com/read.php?50,573157,573157#msg-573157</link>
            <description><![CDATA[ I have this simple stored procedure which return resultset <br />
<br />
CREATE PROCEDURE spGetProductList()<br />
BEGIN<br />
  SELECT ProductName, UnitPrice, UnitsInStock FROM products;<br />
END<br />
<br />
When I use callproc() to call these stored procedure, it work fine<br />
<br />
  h=csr.callproc('spGetProductList')<br />
<br />
  for result in csr.stored_results():<br />
    print (result.fetchall())<br />
<br />
But If I add a parameter to stored procedure, it doesnt work<br />
<br />
CREATE PROCEDURE spGetProductList( qCategoryId INT)<br />
BEGIN<br />
  SELECT ProductName, UnitPrice, UnitsInStock <br />
  FROM products<br />
  WHERE CategoryId=qCategoryId;<br />
END<br />
<br />
I use this code to call these stored procedure, no resultset is returned<br />
<br />
  args = (2,) <br />
  h=csr.callproc('spGetProductList', args)<br />
<br />
  for result in csr.stored_results():<br />
    print (result.fetchall())]]></description>
            <dc:creator>Privida Kristiono</dc:creator>
            <category>Python</category>
            <pubDate>Sun, 02 Dec 2012 14:17:06 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,572394,572394#msg-572394</guid>
            <title>Reading microseconds datetime (mysql 5.6.7) (no replies)</title>
            <link>http://forums.mysql.com/read.php?50,572394,572394#msg-572394</link>
            <description><![CDATA[ I'm using python's MySQLdb to fetch rows from a MySQL 5.6.7 db, that supports microsecond precision datetime columns. When I read a row with MySQLdb I get &quot;None&quot; for the time field. Is there are way to read such time fields with python?]]></description>
            <dc:creator>nick birren</dc:creator>
            <category>Python</category>
            <pubDate>Mon, 29 Oct 2012 09:27:00 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,570643,570643#msg-570643</guid>
            <title>Error: Failed parsing handshake; end byte not precent in buffer (-1) (2 replies)</title>
            <link>http://forums.mysql.com/read.php?50,570643,570643#msg-570643</link>
            <description><![CDATA[ Using Python 3.2 and the MYSQL Connector for Windows, I get this error attempting to connect to a specific database.<br />
<br />
Ths code I'm using:<br />
<br />
<pre class="bbcode">try:
	self.db = mysql.connector.connect(host='localhost', user='root',
	password='blah', database='env')
	self.db.autocommit = True
except mysql.connector.Error as e:
	print(&quot;\n\nError: &quot;+e.msg+&quot; (&quot;+str(e.errno)+&quot;)&quot;)</pre>
<br />
Note that this exact code will connect just fine to a different dtabase, on the same server, with the same user and password.<br />
<br />
I thought it might be because I was attempting to connect to two different databases, so I commented out the first (working) database connection entirely, and I'm still getting this error, so it seems to just have a problem with this specific database.<br />
<br />
Also note the typo in the error message: 'precent'<br />
<br />
In order to give you a stack trace, I took out the try/except:<br />
<br />
<pre class="bbcode"> C:\Python32\lib\site-packages\mysql\connector\connection.py in connect(self=&lt;mysql.connector.connection.MySQLConnection object&gt;, **kwargs={'database': 'env', 'host': 'localhost', 'password': 'blah', 'user': 'root'})
    330 
    331         self.disconnect()
=&gt;  332         self._open_connection()
    333         self._post_connection()
    334     
self = &lt;mysql.connector.connection.MySQLConnection object&gt;, self._open_connection = &lt;bound method MySQLConnection._open_connection o...sql.connector.connection.MySQLConnection object&gt;&gt;

 C:\Python32\lib\site-packages\mysql\connector\connection.py in _open_connection(self=&lt;mysql.connector.connection.MySQLConnection object&gt;)
    291         self._socket = self._get_connection()
    292         self._socket.open_connection()
=&gt;  293         self._do_handshake()
    294         if self._client_flags &amp; ClientFlag.SSL:
    295             self._socket.set_ssl(self._ssl['ca'], self._ssl['cert'],
self = &lt;mysql.connector.connection.MySQLConnection object&gt;, self._do_handshake = &lt;bound method MySQLConnection._do_handshake of &lt;mysql.connector.connection.MySQLConnection object&gt;&gt;

 C:\Python32\lib\site-packages\mysql\connector\connection.py in _do_handshake(self=&lt;mysql.connector.connection.MySQLConnection object&gt;)
    121         except Exception as err:
    122             raise errors.InterfaceError(
=&gt;  123                 'Failed parsing handshake; {}'.format(err))
    124 
    125         regex_ver = re.compile(b&quot;^(\d{1,2})\.(\d{1,2})\.(\d{1,3})(.*)&quot;)
err undefined

InterfaceError: Failed parsing handshake; end byte not precent in buffer
      args = ()
      errno = -1
      msg = 'Failed parsing handshake; end byte not precent in buffer'
      sqlstate = None
      with_traceback = &lt;built-in method with_traceback of InterfaceError object&gt;</pre>]]></description>
            <dc:creator>Beth Hartman</dc:creator>
            <category>Python</category>
            <pubDate>Mon, 17 Dec 2012 18:49:02 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,570326,570326#msg-570326</guid>
            <title>executemany statement with a subquery (1 reply)</title>
            <link>http://forums.mysql.com/read.php?50,570326,570326#msg-570326</link>
            <description><![CDATA[ Hi all,<br />
<br />
I have to insert many rows into DB with some nested select subquery.<br />
<br />
I tried something like that:<br />
<br />
eventsFlat = []<br />
eventsFlat.append((event.id1, event.id2, event.league, event.date, event.type, event.subtype, event.period))<br />
...<br />
self.__cursor.executemany(<br />
                &quot;&quot;&quot;INSERT INTO events (mainevent_id, eventtype_id, eventsubtype_id, period_id) VALUES<br />
                ((select id from mainevents where first_competitor_id=%s and second_competitor_id=%s and league_id=%s and event_date=%s), %s, %s, %s)&quot;&quot;&quot;,<br />
                eventsFlat)<br />
<br />
All I got is the error:<br />
<br />
TypeError('not all arguments converted during string formatting',)<br />
<br />
Is this possible to use executemany to insert rows but with some select subquery included in?<br />
<br />
Kind regards,<br />
Rob]]></description>
            <dc:creator>Robert Koziol</dc:creator>
            <category>Python</category>
            <pubDate>Mon, 22 Oct 2012 13:23:22 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,570169,570169#msg-570169</guid>
            <title>Storing &amp; Retriving Image to displaying (2 replies)</title>
            <link>http://forums.mysql.com/read.php?50,570169,570169#msg-570169</link>
            <description><![CDATA[ Hi,<br />
<br />
I connect to MySql with Python using python-mysql-connector.<br />
<br />
I want to know how can i store and retrive the image and display it on the python window.]]></description>
            <dc:creator>PBL Narasimha Rao</dc:creator>
            <category>Python</category>
            <pubDate>Tue, 30 Oct 2012 08:02:28 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,569314,569314#msg-569314</guid>
            <title>MySQL Connector/Python vs MySQLdb with DBUtils.PooledDB (3 replies)</title>
            <link>http://forums.mysql.com/read.php?50,569314,569314#msg-569314</link>
            <description><![CDATA[ Hi,<br />
<br />
I did some very simple benchmarks with MySQL Connector/Python, MySQLdb and DBUtils.PooledDB.<br />
<br />
1000 selects (1 thread)<br />
<br />
Connector + pool : 20,9 sec<br />
MySQLdb + pool : 4,0 sec<br />
Connector : 13,3 sec (new connection every time)<br />
Connector : 2,4 sec (same cursor)<br />
Connector : 4,8 sec (same connection)<br />
<br />
13,3 sec with new connections every time, but 20,9 sec with a pool?<br />
How is this possible? Is it normal? Why is MySQLdb + pool 5 times faster?]]></description>
            <dc:creator>Normann Koldrack</dc:creator>
            <category>Python</category>
            <pubDate>Tue, 02 Oct 2012 20:46:55 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,569042,569042#msg-569042</guid>
            <title>Get errors when click mySql doc library (1 reply)</title>
            <link>http://forums.mysql.com/read.php?50,569042,569042#msg-569042</link>
            <description><![CDATA[ I got an error message when i tried to click on mySQL doc library.<br />
The error message is<br />
&quot;Error during Open Document Library&quot;<br />
<br />
&quot;error calling Python module function WbDocLib.openDocLib&quot;<br />
<br />
Do I missing the help file?<br />
If I do, where can I donwload and install on MySQL to let Workbench to access it?<br />
<br />
Your help and information is great appreciated,<br />
<br />
Inung]]></description>
            <dc:creator>Inung Huang</dc:creator>
            <category>Python</category>
            <pubDate>Tue, 20 Nov 2012 20:08:59 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,568309,568309#msg-568309</guid>
            <title>update statement not working right (no replies)</title>
            <link>http://forums.mysql.com/read.php?50,568309,568309#msg-568309</link>
            <description><![CDATA[ def batch(corpora,iput):<br />
	import pyodbc,nltk,array,re,itertools,file_ip_console<br />
	from nltk.tokenize import sent_tokenize<br />
	from nltk.tokenize import word_tokenize<br />
	from operator import itemgetter<br />
	from nltk.corpus import stopwords<br />
	from nltk.tag import UnigramTagger<br />
	from nltk.corpus import treebank<br />
	from nltk.tag import SequentialBackoffTagger<br />
	from nltk.corpus import wordnet<br />
	from nltk.probability import FreqDist<br />
	from nltk.tag import tnt<br />
	from nltk.corpus import conll2007<br />
	from nltk.tag import AffixTagger<br />
	from nltk.corpus import brown<br />
	from nltk.corpus import reuters<br />
	from nltk.corpus import stopwords<br />
<br />
#########################################<br />
# Connect to database                   #  <br />
#########################################<br />
<br />
	cnxn = pyodbc.connect('Driver={MySQL ODBC 5.1 Driver};Server=127.0.0.1;Port=3306;Database=information_schema;User=root; Password=1234;Option=3;')<br />
	cursor = cnxn.cursor()<br />
	cursor.execute(&quot;use collegedatabase ;&quot;)<br />
	cursor.execute(&quot;select * from tblalldata;&quot;)<br />
	cnxn.commit()<br />
	def isAcceptableChar(character):<br />
		return character not in &quot;~@#$%^&amp;*()_+`1234567890-={}|&lt;&gt;[]\',/\&quot;&quot;<br />
<br />
<br />
	if corpora ==1:<br />
		train_sents = treebank.tagged_sents()[:6000000]<br />
		<br />
	if corpora ==2:<br />
		train_sents = conll2007.tagged_sents()[:6000000]<br />
	if corpora ==3:<br />
		train_sents = brown.tagged_sents(categories='news')[:6000000]<br />
<br />
<br />
		<br />
	tagger = UnigramTagger(train_sents)<br />
	tnt_tagger = tnt.TnT()<br />
	tnt_tagger.train(train_sents)<br />
	affix_tagger  = AffixTagger(train_sents)<br />
	<br />
	<br />
	s=[];ji=[];text=[];tokens = [];pos_tagging= [];length_of_pos_tagging=[];nnp_array=[];nnp_array_index_coloumn=[];nnp_array_index_row=[];uniques = [];c= [];add1 = 0;add2 =0;regex = re.compile(&quot;\w+\.&quot;)<br />
	english_stops = set(stopwords.words('english'))<br />
	<br />
	<br />
	for entry in cursor:<br />
		s.append(entry.propernoun_SRNO),ji.append(entry.regular_text)<br />
		<br />
		<br />
	if iput ==1:<br />
		<br />
		for i in range(0,len(s)):<br />
			<br />
			text.append(filter(isAcceptableChar, ji<i>))<br />
			tokens.append([word for word in nltk.regexp_tokenize(text<i>,r&quot;\w+&quot;) if word not in english_stops])<br />
			pos_tagging.append(tagger.tag(tokens<i>))<br />
			length_of_pos_tagging.append(len(pos_tagging<i>))<br />
			<br />
			for j in range(0,length_of_pos_tagging<i>):<br />
				<br />
				if pos_tagging<i>[j][1] == &quot;NNP&quot; or pos_tagging<i>[j][1] == &quot;NP-TL&quot; or pos_tagging<i>[j][1] == &quot;NP$&quot; or pos_tagging<i>[j][1] == &quot;NP&quot;  or pos_tagging<i>[j][1] == None or pos_tagging<i>[j][1] == &quot;Unk&quot;:<br />
					<br />
					nnp_array.append(list(pos_tagging<i>[j])[0])<br />
					nnp_array_index_coloumn.append(i)<br />
					nnp_array_index_row.append(j)<br />
<br />
<br />
		starting_index =  file_ip_console.sql_var_index<br />
		ending_index = starting_index +len(s)<br />
		<br />
		i = 0<br />
		for j in range(starting_index,ending_index):<br />
			for i in range(0,len(s)):<br />
				c.append(nnp_array_index_coloumn.count(i))<br />
				add1 = add1 + c[i-1]<br />
				add2 = add1 + c<i><br />
				xx = str(iput),str(corpora)<br />
				cursor.execute(&quot;update tblauto_tagged set tagger_train = ? ,propernoun = ? ,propernoun_ID = ? where propernoun_SRNO = ? &quot;,str(xx),str(nnp_array[add1:add2]),str(c<i>),j )<br />
				for item in nnp_array_index_coloumn:<br />
					if item not in uniques:<br />
						uniques.append(item)<br />
						add1=0;add2=0<br />
<br />
		write_ending_loop_index = open(&quot;C:\\Users\\vchauhan\\Dropbox\\Code\\sql_var.txt&quot;,&quot;w&quot;)<br />
		write_ending_loop_index.write(str(j))<br />
		write_ending_loop_index.close()<br />
		<br />
<br />
<br />
	cnxn.commit()<br />
	return()<br />
<br />
########################################################################<br />
<br />
The problem with this code is it does not write back into table tblauto_tagged python code does not return any error and I am not so good at programming and database; <br />
########################################################################</i></i></i></i></i></i></i></i></i></i></i></i></i></i>]]></description>
            <dc:creator>Vaibhav Chauhan</dc:creator>
            <category>Python</category>
            <pubDate>Wed, 12 Sep 2012 19:33:11 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,564290,564290#msg-564290</guid>
            <title>MySQL Connector/Python (no replies)</title>
            <link>http://forums.mysql.com/read.php?50,564290,564290#msg-564290</link>
            <description><![CDATA[ MySQL Connector/Python is a 100% Pure Python implementation of Python Database API v2.0 (PEP 249). The MySQL Protocol is implemented in Python. It does not require the C library libmysqlclient, thus no compiling.<br />
<br />
MySQL Connector/Python:<br />
- Download: <a href="http://dev.mysql.com/downloads/connector/python/"  rel="nofollow">http://dev.mysql.com/downloads/connector/python/</a><br />
- Docs: <a href="http://dev.mysql.com/doc/connector-python/en/index.html"  rel="nofollow">http://dev.mysql.com/doc/connector-python/en/index.html</a><br />
- Forum: <a href="http://forums.mysql.com/posting.php?50"  rel="nofollow">http://forums.mysql.com/posting.php?50</a><br />
<br />
<br />
MySQL Connector/Python: Python Database API v2.0 (PEP 249)<br />
- <a href="http://geert.vanderkelen.org/getting-mysql-connectorpython-compliant-with-pep-249/"  rel="nofollow">http://geert.vanderkelen.org/getting-mysql-connectorpython-compliant-with-pep-249/</a><br />
<br />
<br />
MySQL Connector/Python: Install &amp; Config<br />
- <a href="http://dev.mysql.com/doc/connector-python/en/connector-python-install.html"  rel="nofollow">http://dev.mysql.com/doc/connector-python/en/connector-python-install.html</a><br />
- <a href="http://geert.vanderkelen.org/how-to-install-mysql-connectorpython/"  rel="nofollow">http://geert.vanderkelen.org/how-to-install-mysql-connectorpython/</a><br />
- <a href="http://geert.vanderkelen.org/settings-client-flags-with-mysql-connectorpython/"  rel="nofollow">http://geert.vanderkelen.org/settings-client-flags-with-mysql-connectorpython/</a><br />
<br />
<br />
MySQL Connector/Python: Database Pooling<br />
- <a href="http://geert.vanderkelen.org/2010/08/mysql-connectorpython-is-or-should-be.html"  rel="nofollow">http://geert.vanderkelen.org/2010/08/mysql-connectorpython-is-or-should-be.html</a><br />
<br />
<br />
MySQL Connector/Python: Misc<br />
- <a href="http://geert.vanderkelen.org/connectorpython-custom-cursors/"  rel="nofollow">http://geert.vanderkelen.org/connectorpython-custom-cursors/</a><br />
- <a href="http://geert.vanderkelen.org/fetching-rows-as-dictionaries-with-mysql-connectorpython/"  rel="nofollow">http://geert.vanderkelen.org/fetching-rows-as-dictionaries-with-mysql-connectorpython/</a><br />
- <a href="http://geert.vanderkelen.org/query-caching-with-mysql-connectorpython/"  rel="nofollow">http://geert.vanderkelen.org/query-caching-with-mysql-connectorpython/</a><br />
- <a href="http://geert.vanderkelen.org/buffering-results-with-mysql-connectorpython/"  rel="nofollow">http://geert.vanderkelen.org/buffering-results-with-mysql-connectorpython/</a><br />
- <a href="http://geert.vanderkelen.org/getting-illegal-dates-from-mysql-with-connectorpython/"  rel="nofollow">http://geert.vanderkelen.org/getting-illegal-dates-from-mysql-with-connectorpython/</a><br />
- <a href="http://geert.vanderkelen.org/using-character-sets-with-mysql-connectorpython/"  rel="nofollow">http://geert.vanderkelen.org/using-character-sets-with-mysql-connectorpython/</a><br />
<br />
<br />
MySQL Connector/Python: SQLAlchemy<br />
- <a href="http://geert.vanderkelen.org/2010/02/status-report-no2-on-sqlalchemy-and.html"  rel="nofollow">http://geert.vanderkelen.org/2010/02/status-report-no2-on-sqlalchemy-and.html</a><br />
- <a href="http://geert.vanderkelen.org/small-status-on-sqlalchemy-and-mysql-connectorpython/"  rel="nofollow">http://geert.vanderkelen.org/small-status-on-sqlalchemy-and-mysql-connectorpython/</a><br />
- <a href="http://geert.vanderkelen.org/going-chemical-sqlalchemy-and-mysql-connectorpython/"  rel="nofollow">http://geert.vanderkelen.org/going-chemical-sqlalchemy-and-mysql-connectorpython/</a><br />
<br />
<br />
MySQL Connector/Python: Python 3.x<br />
- <a href="http://geert.vanderkelen.org/status-on-mysql-connectorpython-and-python-v3-1/"  rel="nofollow">http://geert.vanderkelen.org/status-on-mysql-connectorpython-and-python-v3-1/</a><br />
- <a href="http://geert.vanderkelen.org/mysql-with-python-v3-1-now-also-possible-using-mysql-connectorpython/"  rel="nofollow">http://geert.vanderkelen.org/mysql-with-python-v3-1-now-also-possible-using-mysql-connectorpython/</a>]]></description>
            <dc:creator>Edwin Desouza</dc:creator>
            <category>Python</category>
            <pubDate>Tue, 07 Aug 2012 19:53:47 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,564289,564289#msg-564289</guid>
            <title>MySQL Connector/Python:  v1.0.5 (BETA) (no replies)</title>
            <link>http://forums.mysql.com/read.php?50,564289,564289#msg-564289</link>
            <description><![CDATA[ MySQL Connector/Python is a 100% Pure Python implementation of Python Database API v2.0 (PEP 249).  The MySQL Protocol is implemented in Python. It does not require the C library libmysqlclient, thus no compiling. <br />
<br />
<a href="http://geert.vanderkelen.org/mysql-connector-python-1-0-5-beta/"  rel="nofollow">http://geert.vanderkelen.org/mysql-connector-python-1-0-5-beta/</a>]]></description>
            <dc:creator>Edwin Desouza</dc:creator>
            <category>Python</category>
            <pubDate>Tue, 07 Aug 2012 19:48:46 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,564275,564275#msg-564275</guid>
            <title>MySQL Connector/Python v1.0.5 beta released (no replies)</title>
            <link>http://forums.mysql.com/read.php?50,564275,564275#msg-564275</link>
            <description><![CDATA[ MySQL Connector/Python v1.0.5 beta has been released. The official announcement<br />
can be read here:<br />
 <a href="http://forums.mysql.com/read.php?3,564274,564274#msg-564274"  rel="nofollow">http://forums.mysql.com/read.php?3,564274,564274#msg-564274</a><br />
<br />
Downloads:<br />
 <a href="http://dev.mysql.com/downloads/connector/python/"  rel="nofollow">http://dev.mysql.com/downloads/connector/python/</a><br />
<br />
Please report any bugs or inconsistencies you observe to our Bugs Database:<br />
 <a href="http://bugs.mysql.com"  rel="nofollow">http://bugs.mysql.com</a><br />
<br />
Blogs:<br />
 <a href="http://geert.vanderkelen.org/mysql-connector-python-1-0-5-beta/"  rel="nofollow">http://geert.vanderkelen.org/mysql-connector-python-1-0-5-beta/</a><br />
<br />
Enjoy!]]></description>
            <dc:creator>Geert Vanderkelen</dc:creator>
            <category>Python</category>
            <pubDate>Tue, 07 Aug 2012 18:14:45 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,560048,560048#msg-560048</guid>
            <title>create PL/Python Functions (no replies)</title>
            <link>http://forums.mysql.com/read.php?50,560048,560048#msg-560048</link>
            <description><![CDATA[ Hello.<br />
<br />
Is it possible to use some python function in directly in mysql ?<br />
Or can i write extension with python\cpython for mysql ?<br />
Extension i means something like this - <a href="http://www.codeproject.com/Articles/15643/MySQL-User-Defined-Functions"  rel="nofollow">http://www.codeproject.com/Articles/15643/MySQL-User-Defined-Functions</a><br />
but with python, not with C.<br />
<br />
thank you.]]></description>
            <dc:creator>Vladyslav Tarasenko</dc:creator>
            <category>Python</category>
            <pubDate>Thu, 05 Jul 2012 20:59:22 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?50,541648,541648#msg-541648</guid>
            <title>PYLOTDB: A Python-MySQL database management and analysis tool (no replies)</title>
            <link>http://forums.mysql.com/read.php?50,541648,541648#msg-541648</link>
            <description><![CDATA[ Many readers have asked whether there's Python GUI software for creating,<br />
managing, and analyzing (plotting from) MySQL databases. I have just released such software as completely open source. Source code is available on GitHub as follows:<br />
<br />
1. Install Git on your machine from github.com<br />
2. Initialize the target directory with &quot;git init&quot;<br />
3. Download the software using &quot;git pull git://github.com/dwbarne/PYLOTDB&quot;<br />
4. Read README_first.rtf file using Microsoft Word and follow directions.<br />
<br />
PYLOTDB consists of two codes, PylotDB and Co-PylotDB. The software allows<br />
users to access either local or remote MySQL servers and easily display<br />
table data in a GUI format.<br />
<br />
In PylotDB data can be filtered, and table columns are indexed with<br />
radiobuttons and checkboxes so data can be easily selected for plotting or<br />
statistical analysis. Plotting capability includes X-Y, semi-log, log-log,<br />
Kiviat (radar charts), scatter, and scatter with polynomial curve fits of<br />
the data. Entire databases, selected databases, or selected tables in<br />
selected databases can be backed up and restored as desired. Interfaces are<br />
provided for individual entry edits and additions.<br />
<br />
PylotDB's companion software Co-PylotDB is used to send data files to a<br />
user-selected database table. If data files are in YAML format, PylotDB can<br />
automatically extract each entry in the file, expand the database table<br />
with new fields with names taken from the YAML entries, and insert the data<br />
in those fields for plotting and analysis. This is a tremendous time saver<br />
for analysts. This allows the cycle of &quot;data capture to storage to<br />
analysis&quot; to be completed in a matter of minutes.<br />
<br />
A powerful feature of PylotDB is the storage buffer where selected data<br />
from any table on any server can be stored and mathematically combined to<br />
generate new data not currently in any accessed table. The new data can<br />
then be plotted along with other data from the currently displayed table.<br />
This allows the user to generate desired data on the fly without the<br />
necessity of modifying any of the stored tables.<br />
<br />
PYLOTDB's dependencies include matplotlib, numpy, MySQLdb, Python<br />
MegaWidgets (Pmw), and YAML. All of these dependencies are included in the<br />
download for Windows machines only. They can easily be found on the web for<br />
Mac or Linux machines.<br />
<br />
Sample databases are also included to help users get up to speed quickly.<br />
<br />
We are using this software in my company for analyzing results from our<br />
computer performance modeling analysis, but it can be used for any type of<br />
analysis where database storage and analysis is desired.<br />
<br />
Hope this proves helpful for your readers.]]></description>
            <dc:creator>Daniel Barnette</dc:creator>
            <category>Python</category>
            <pubDate>Fri, 25 May 2012 22:39:46 +0000</pubDate>
        </item>
    </channel>
</rss>
