[Tutor] writing sample program that zips files and saves in a backup directory
kent37 at tds.net
Tue Oct 13 23:17:08 CEST 2009
On Tue, Oct 13, 2009 at 4:38 PM, David Eric <ciik13 at gmail.com> wrote:
> as far as print zip_command, i would add that to the program however, doesnt
> just declaring it actually trigger it..thus it would executed and the
> command line would get printed as well?
I'm not sure what you mean by "declaring", but assigning a value to
zip_command, as you do, and printing it, as I suggest, do just that -
assign and print. It is the call to os.system() that executes the
> the actual program i was looking to write would take:
> file1,file2,and file3, in /Users/davidteboul/bin/python
> and condense them into individual files; file1.gz, file2.gz and file3.gz and
> save them in a directory already made - (/Users/davidteboul/backups)
I think that doing this with gzip, you have to first copy the files to
the backup directory, then run gzip on the backup.
> ps..did i post and reply all corretly?
You can intersperse your comments with the original email, as I have
done above, rather than putting your entire reply at the end. The
reply all is fine.
More information about the Tutor