clear content of 'printed'
Jeff Epler
jepler at unpythonic.net
Sun Aug 22 10:10:20 EDT 2004
What is "printed" (and why do you think that 'print "some text"' will
modify it)? What is "container", that it has a "writeToFile" method?
You must be using some non-standard module you didn't mention.
If I understand what you're asking for, I might write something like
for i, id in enumerate(myList):
f = open(id, "w")
print >>f, "some text"
(Enumerate is a new built-in function in Python 2.3. The "print >>"
syntax has been available since 2.1 or so)
Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20040822/db6af2cb/attachment.sig>
More information about the Python-list
mailing list