Ya esta disponible el manual traducido por el amigo Carlos Miguel FARIAS
python3 setup.py install
C:\Users\Jurasec\Downloads\PyMySQL3-0.4\PyMySQL3-0.4\c:\Python32\python.exe setup.py install running install running build running build_py running install_lib creating c:\Python32\Lib\site-packages\pymysql copying build\lib\pymysql\charset.py c:\Python32\Lib\site-packages\pymysql copying build\lib\pymysql\connections.py c:\Python32\Lib\site-packages\pymysql creating c:\Python32\Lib\site-packages\pymysql\constants copying build\lib\pymysql\constants\CLIENT.py -> c:\Python32\Lib\site-packages\pymysql\constants copying build\lib\pymysql\constants\COMMAND.py -> c:\Python32\Lib\site-packages\pymysql\constants
#!/usr/bin/env python import pymysql #conn = pymysql.connect(host='127.0.0.1', unix_socket='/tmp/mysql.sock', user='root', passwd=None, db='mysql') conn = pymysql.connect(host='127.0.0.1', port=3306, user='root', passwd='mysql', db='test') cur = conn.cursor() cur.execute("SELECT * FROM estados") print (cur.description) #r = cur.fetchall() #print (r) for r in cur.fetchall(): print ("Id: {0}, Estado: {1}".format(r[0], r[1])) cur.close() conn.close()
VFP to Python |
Consultar este sitio |
VFP to Python |
Consultar este grupo |