Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

kj1k Group Title

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

  • one year ago
  • one year ago

  • This Question is Closed
  1. Screech Group Title
    Best Response
    You've already chosen the best response.
    Medals 2

    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.

    • one year ago
  2. Screech Group Title
    Best Response
    You've already chosen the best response.
    Medals 2

    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.

    • one year ago
  3. kj1k Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    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

    • one year ago
  4. Screech Group Title
    Best Response
    You've already chosen the best response.
    Medals 2

    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.

    • one year ago
  5. kj1k Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

    • one year ago
  6. Screech Group Title
    Best Response
    You've already chosen the best response.
    Medals 2

    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.

    • one year ago
  7. Screech Group Title
    Best Response
    You've already chosen the best response.
    Medals 2

    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.

    • one year ago
    • Attachments:

See more questions >>>

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.