anonymous
  • anonymous
Starting Project 2 "Game of Life". I tried running the template and got an error that "Windows" name is undefined. Looked at graphics.py and it appears that there is only a Graphwin class. Changed statement in template file and now get a window to open, but hangs up because it does not find a canvasFrame class. Is there something else that needs to be imported? Thanks, Sigurd aka kj1k
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW)
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
katieb
  • katieb
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
I just started as well. I haven't made any changes to template yet, but I didn't get the error you described. It created a blank window and then got a Python error looking for an __init__ method which I had not yet supplied.
anonymous
  • anonymous
There is a Window class defined at line 836 in graphics.py right after the definition of the GraphWin class. I put some print statements into game_of_life.py right aftet the "Initialize Board" comment to make sure that the class was being created. It was. It sailed right through with no problem. I don't know why its not working for you.
anonymous
  • anonymous
I am using graphics.py version 4.2.5, dated 5/26/2011. Are you using the same version? I don't see a Window class defined at all. Thanks, Sigurd aka kj1k

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
I used the graphics.py and documentation linked to from the course page ( http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-189-a-gentle-introduction-to-programming-using-python-january-iap-2011/assignments/ ) The highest version number listed update history comments is Version 3.5 5/10/09.
anonymous
  • anonymous
Thank you very much. Not sure how/why I got a later incompatible version of the library. Looks like it solved my immediate problem. Still have work to do, but this one is solved.
anonymous
  • anonymous
You are very welcome. Just got the simulate step to work (I think). Was confusing in that I forgot that a "for" loop on a dictionary returns the keys, not the item from the dictionary whose value is obtained with the key. I thought I had a "block" when in fact I had a tuple. I wasn't sure what "toad" was supposed to do. The simulate changed the grid and I had to work it out by hand to be sure it was correct.
anonymous
  • anonymous
I'm thinking that the pulsar block list may be incorrect or incomplete. It went through 8 changes and then became a fixed pattern. It didn't look like the picture from the Conway Wiki.

Looking for something else?

Not the answer you are looking for? Search for more explanations.