os.system and subprocess odd behavior

Hans Mulder hansmu at xs4all.nl
Tue Dec 18 17:46:11 EST 2012


On 17/12/12 21:56:50, py_genetic wrote:
> /usr/local/Calpont/mysql/bin/mysql --defaults-file=/usr/local/Calpont/mysql/my.cnf -u root myDB < /home/myusr/jobs/APP_JOBS/JOB_XXX.SQL > /home/myusr/jobs/APP_JOBS/JOB_XXX.TXT

If you're trying to interact with a MySQL database, then
you should really use the myslqdb module.  Trying to parse
the output of the command-line utility is harder, and is
too fragile for production use.


Hope this helps,

-- HansM



More information about the Python-list mailing list