title: Can't get python to read my .txt file on OS X
body: <p>I'm trying to get IDLE to read my .txt file but for some reason it won't.  I tried this same thing at school and it worked fine using a Windows computer with Notepad, but now using my Mac with IDLE won't read (or find) my .txt file.</p>
  
  <p>I made sure they were in the same folder/directory and that the file was formatted in plain text, still I get errors. Here's the code I was using:</p>
  
  <pre><code>def loadwords(filename):
  
     f = open(filename, "r")
     print(f.read())
     f.close()
     return
  
  filename = input("enter the filename: ")
  loadwords(filename)
  </code></pre>
  
  <p>and here is the error I got after I enter the file name "test.txt" and press enter:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/Computer Sci/My programs/HW4.py", line 8, in &lt;module&gt;
      loadwords(filename)
    File "/Computer Sci/My programs/HW4.py", line 4, in loadwords
      print(f.read())
    File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/encodings/ascii.py", line 26, in decode
      return codecs.ascii_decode(input, self.errors)[0]
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xff in position 0: ordinal not in range(128)
  </code></pre>