Multiple os.system calls

Stefan Schwarzer s.schwarzer at ndh.net
Thu Jan 3 19:20:58 EST 2002


Hello Rob

Rob Hancock wrote:
> 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
> me?

You could use os.popen to feed the filenames to tar via standard input.

Stefan



More information about the Python-list mailing list