[Tutor] Zipping files and Mysql
gagnrath at verizon.net
gagnrath at verizon.net
Tue Jun 28 18:40:31 CEST 2011
First time trying to use it, so I don't expect it to work. Got to see if I have a file i don't mind playing around with to see if I can zip it up using the zipfile.
As for the MySQL, I think I may have to resign myself to using an alternate method than the straight python libraries.
Jun 28, 2011 04:02:48 AM, timomlists at gmail.com wrote:
===========================================
On 27-06-11 21:45, gagnrath at verizon.net wrote:
> I am trying to write a script that will dump a mysql db and then zip the file.
>
>
> I do know about mysqldb, but I was wondering if there is anything native to the libraries that will allow me to do this without using a seperate piece. Then after I gather the DBs, I need to zip them. I wrote the following, but wanted to know if I am heading in the correct direction.
>
> zipfile.zipfile(/myfiles/my_db/, w, zip_stored)
Well, for what it's worth, I'm using the zipfile module as well in one
of my projects to make a backup of the user's configuration directory.
Which works pretty good.
Do have a good look though at the documentation or find some examples
through your search engine, because the above line won't work at all.
Cheers,
Timo
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
_______________________________________________
Tutor maillist - Tutor at python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list