[Tutor] Multiple file open
nitin chandra
nitinchandra1 at gmail.com
Fri Aug 20 10:27:01 CEST 2010
Thank you, Alan and Steven.
Now i am facing some thing 'different'
This is even when i have not done a carriage return to create line "66".
This is after i have done
fp1.close()
fp2.close()
fp3.close()
******************************************************
File "mer5Pr2.py", line 66
^
IndentationError: unexpected unindent
************************************************
Thank you
Nitin
On Fri, Aug 20, 2010 at 1:28 PM, Alan Gauld <alan.gauld at btinternet.com> wrote:
>
> "nitin chandra" <nitinchandra1 at gmail.com> wrote
>>
>> FileA = raw_input('Enter CSV file with lists of Files:')
>> try:
>> fp6 = open(FileA,'r')
>> except IOError:
>>
>> ## I am getting the following error at this line:-
>> ##
>> ## File "mer5Pr2.py", line 7
>> ## except IOError:
>> ## ^
>> ## SyntaxError: invalid syntax
>
>
> The except needs to align with the try.
>
>
> try:
> #code here
> except:
>
> HTH
>
>
> --
> Alan Gauld
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
>
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
More information about the Tutor
mailing list