Unusual i/o problems

Peter Otten __peter__ at web.de
Wed May 16 10:55:50 EDT 2007


saif.shakeel at gmail.com wrote:

> output_file = open(test_file,"w")
  ... 
> input_xml_sec = open(output_file,'r')

Can you spot the problem now? To prevent it, use a naming convention that
allows you to distinguish between file /names/ and file /objects/.

>                   But i am getting an error on this line
> (input_xml_sec = open(output_file,'r')).I have tried to figure out but
> not able to debug.Can someone throw some light or anything they feel
> could be going wrong somewhere.

In the future, to make it as easy as possible to help you, please post the
actual traceback which contains valuable hints about the error you
encountered even if you cannot make sense of it.

Peter



More information about the Python-list mailing list