I've searched high and low for a simple explanation of how to execute command line, in windows, from within python.
The subprocess package seems to be the answer, but I do not appear to be sufficiently experienced to make head nor tail of it.
Some questions I have reviewed to no avail, through lack of windows focus, or through lack of examples and expected outputs. e.g. Command line question
Could someone, for example, explain how to achieve the following:
- Create a filename in python (e.g.
"db_dump 2013-08-05.sql"
) - Dump a mysql database using the mysql command line utilities (e.g.
mysqldump --result-file="db_dump 2013-08-05.sql" --all-databases
)