execute python code from db
robert
hodmann at lycos.nl
Wed Jan 26 07:56:10 EST 2005
More information about the Python-list mailing list
Wed Jan 26 07:56:10 EST 2005
- Previous message (by thread): "pickle" vs. f.write()
- Next message (by thread): execute python code from db
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello,
Anybody knows if it's possible to execute python code from an db.
db=MySQLdb.connect(host="localhost",user="r",passwd="j",db="v")
c=db.cursor()
c.execute("""SELECT * FROM table
WHERE id = %s""", (id,))
for python_code in c.fetchall():
execute (python_code)
Maybe feed python with stdin??.
robert.
- Previous message (by thread): "pickle" vs. f.write()
- Next message (by thread): execute python code from db
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list