building a large file

Emile van Sebille emile at fenx.com
Sat Apr 14 09:27:08 EDT 2001


Doesn't tar do exactly this?

--

Emile van Sebille
emile at fenx.com

---------
"Thomas Duterme" <thomas at madeforchina.com> wrote in message
news:mailman.987235759.19334.python-list at python.org...
> Hi everyone,
>
> So I need to build a very large file.  Essentially, I need
> to go through a directory and recursively append the
> contents of each file from that directory to a file.
>
> Here's what I'm doing right now:
>
> for x in os.listdir('.'):
> os.system('cat '+x+' >> mylargefile)
>
> Is there any smarter way to do this in python?
>
> Thanks,
> Thomas
>





More information about the Python-list mailing list