#!/usr/bin/env python
#--*-- coding:UTF-8 --*--
import MySQLdb
vinc_db=MySQLdb.connect(host="localhost", user="root", passwd="", db="python_db")
comando="INSERT INTO USER(pseudo) VALUE('Sergio')"
vinc_db.query(comando)
vinc_db.commit()
comando="SELECT * FROM USER"
vinc_db.query(comando)
resultado= vinc_db.store_result()
nb_tupla=resultado.num_rows()
for l in resultado.fetch_row(maxrows=nb_tupla,how=1):
	print l["id"],l["PSEUDO"]
vinc_db.close()
