Processing a MySQL Dump file with Python

Alex Martelli aleaxit at yahoo.com
Mon Oct 4 12:59:04 EDT 2004


Nico Grubert <nicogrubert at arcor.de> wrote:
   ...
> What I need to do is calling "mysql -h myhost.com -p -u myusername < 
> dumpfile" directly from python.
> How can I do this in python?

import os
os.system("mysql -h myhost.com -p -u myusername dumpfile")


Alex



More information about the Python-list mailing list