C
Christian Otteneuer
Hello Newsgroup,
I have the following problem:
I want to write a python script, that writes text into files. The text is
being "collected" in a for-loop, the code looks like this:
for i in range(len(myList)):
id = myList
print "some text"
container.writeToFile(id, printed)
Where writeToFile() creates a new file with the id 'id' and fills it with
'printed'. The problem is, that I have to delete the
content of 'printed' before entering the for-loop again. Else, I'll find
the content of the past for-loops in my file. (The file created in the
second loop would look like this
some text
some text
Is there a possibility to do clear the content of 'printed' in python?
Thanks alot!!
I have the following problem:
I want to write a python script, that writes text into files. The text is
being "collected" in a for-loop, the code looks like this:
for i in range(len(myList)):
id = myList
print "some text"
container.writeToFile(id, printed)
Where writeToFile() creates a new file with the id 'id' and fills it with
'printed'. The problem is, that I have to delete the
content of 'printed' before entering the for-loop again. Else, I'll find
the content of the past for-loops in my file. (The file created in the
second loop would look like this
some text
some text
Is there a possibility to do clear the content of 'printed' in python?
Thanks alot!!