sqlite with Python has an executescript() function. The best the mysqldb has is a executemany() function (simple example below):
cursor.executemany(
"""INSERT INTO breakfast (name, spam, eggs, sausage, price)
VALUES (%s, %s, %s, %s, %s)""",
[
("Spam and Sausage Lover's Plate", 5, 1, 8, 7.95 ),
("Not So Much Spam Plate", 3, 2, 0, 3.95 ),
("Don't Wany ANY SPAM! Plate", 0, 4, 3, 5.95 )
] )
This link may be useful as well for showing more complexity:
http://stackoverflow.com/questions/9747 ... xecutemany