As part of the MIT OpenCoursework lectures, as an asignment, I was given the task to write my code based on this
(http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/assignments/ps5.py) predefined code that was given (my problem relates to the very first function "load_words()".
Without changing it, running that file should result in:
- Code: Select all
Loading word list from file...
83667 words loaded.
play_game not implemented.
play_hand not implemented.
Unfortunately, it shows:
- Code: Select all
Traceback (most recent call last):
File "C:\Python32\MIT\ps5.py", line 235, in <module>
word_list = load_words()
File "C:\Python32\MIT\ps5.py", line 27, in load_words
inFile = open(WORDLIST_FILENAME,"r", 0)
ValueError: can't have unbuffered text I/O
Im working with python 3.2 (windows), the predefined code was written in python 2.6 or something.
What do I have to change to make it work?
edit: fixed links,spelling
