[Tutor] writing sample program that zips files and saves in a backup directory

David Eric ciik13 at gmail.com
Tue Oct 13 23:38:10 CEST 2009

On Tue, Oct 13, 2009 at 5:17 PM, Kent Johnson <kent37 at tds.net> wrote:

> 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
> command.

> oh i see the if os.sytem() command in the program is what ran the
> zip_command

> > 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.
> Kent

thanks for the help, ill try some stuff and see if i can get it to work
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20091013/2f16ba15/attachment.htm>

More information about the Tutor mailing list