I'm running code under Enthought Canopy to open and read a file. It keeps telling me IOError.
But I am pretty sure the text file name is right and it is in the same directory with the Python file, and the code works well in other IDEs like Python IDLE. Don't know what's wrong. Any suggestions?
inFile = open('words.txt', 'r')
words = inFile.read().split()
fails with IOError: [Errno 2] No such file or directory: 'words.txt'
'words.txt.txt'
. – Unpeg