Multiple os.system calls
aleax at aleax.it
Fri Jan 4 08:05:24 EST 2002
"Rob Hancock" <mlistbox at yahoo.com> wrote in message
news:mailman.1010099405.19889.python-list at python.org...
> Hello Everyone,
> I am trying to send a list of filenames to tar. Right
> now I'm doing this with multiple calls to os.system,
> changing the filename each time. Horrible I know, but
> I haven't figured out how to use the other os fuctions
> to accomplish this any better. Can someone enlighten
What about os.system('tar cf result.tar ' + ' '.join(thefilenames))?
Assuming that what tar is doing with the filenames is adding
them to a tarfile, of course (you don't really make that very
clear, at least not to my reading).
More information about the Python-list