On 28/06/13 23:18, Matt D wrote:
what if i did some thing like this i saw on stackoverflow:
f = open("bigfile.txt", "w")
That clears any existing content of bigfile.txt, and opens it for writing. Do
you intend to clear the content?
for tempfile in tempfiles:
What is in tempfiles? A list of files opened for reading? Where does this list
come from?
while True:
data = tempfile.read(65536)
if data:
f.write(data)
else:
break
This copies the content of each tempfile into bigfile.txt.
could i make the 'logfile.txt. a tempfile?
I don't know. What do you mean by tempfile?
and could the f.write be changed to f.append?
No, files do not have an append method. Open the file in append mode, then all
writes will append to the end of the file.
--
Steven
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor