[Tutor] Multiple file open

Walter Prins wprins at gmail.com
Fri Aug 20 22:47:31 CEST 2010


Hello Nitin,

On 20/08/10 16:21, nitin chandra wrote:
> import sys,os, fileinput
>    
[...]
> while True:
>     try:
>         line1 = fp1.readline().split(",")
>         line2 = fp2.readline().split(",")
>    
[...]
>         fp3.write(str3)
>    
You're missing the completion for the try/finally block.  Try adding an 
exception handler or comment out the "try" statement for the time being.

Walter


More information about the Tutor mailing list