[Tutor] a quick Q: how to use for loop to read a series of files with .doc end
andreas.perstinger at gmx.net
Sat Oct 8 08:50:34 CEST 2011
On 2011-10-08 08:25, lina wrote:
>> Still have a reading "multiple" files issue:
>>> Traceback (most recent call last):
>>> File "counter-vertically-WORKING.**py", line 26, in<module>
>>> IndexError: list index out of range
>>> only one file ss_1.xpm was processed and wrote file, for the rest
>>> ss_3.xpm and following keep intact,
>>> any suggestions?
> you may rename ss_1.xpm to the ss_2 or 3, keep them the same is okay, just
> different names.
Ok, I just ran your script with this files and don't get an error.
Except some stylistic issues the code looks fine. The resulting
txt-files still have the problem with the leading '[' and trailing ']'
but I've already suggested a solution earlier today.
Do you still get an error?
More information about the Tutor