Reading


#1

Hi guys,

Why doesn't this work?

my_file = open("output.txt", "r")
print my_file.read()
my_file.close()

I get the error:

Traceback (most recent call last):
File "python", line 1, in
IOError: [Errno 2] No such file or directory: 'output.txt'

I also tried with r+, any help would great!

Cheers


#2


try reading this.
it's a common problem people have.
nothing you're doing wrong.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.