[Tutor] a quick Q: how to use for loop to read a series of files with .doc end
lina.lastname at gmail.com
Sat Oct 8 09:28:06 CEST 2011
On Sat, Oct 8, 2011 at 2:50 PM, Andreas Perstinger <
andreas.perstinger at gmx.net> wrote:
> 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?
I figured it out, my mistake,
the following files from ss_2.xpm to ss_10.xpm has one more line than
so after changed
before the ss_1.xpm was taking as the trial and finished, the last 9 was
generated with script, so there was a very minor differences.
Thanks for your help,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor