inshu chauhan wrote:
> Yes I just want to concat the files , not parse/mangle the files. How
> can
> i simply read all files in a folder in my computer and write them into a
> single file ? just by 'printf ' is it possible ?
Assuming the files' last line always ends with a newline and the files use
the same newline convention:
OUTFILE = "/path/to/outfile.barf"
infiles = glob.glob("/some/folder/*.arff")
with open(OUTFILE, "wb") as outstream:
for infile in infiles:
with open(infile, "rb") as instream:
shutil.copyfileobj(instream, outstream)
--
http://mail.python.org/mailman/listinfo/python-list