I started now to learn Python, so my question is kinda stupid
I have this piece of code
#!/usr/local/bin/python3
# encoding: utf-8
fh = open("lines.txt")
for lines in readlines():
print(lines)
the text file lines.txt exits and it is at the same directory of my page, I using Komodo Edit, when I run the file, I get this error.
Traceback (most recent call last):
File "/Users/Jeff/Sites/PythonLearning/forloop.py", line 4, in <module>
fh = open("lines.txt")
IOError: [Errno 2] No such file or directory: 'lines.txt'
Funny thing, if i open this file in IDLE, it works nicely, as well if I open in Mac os X terminal!
Thanks a lot!!