Python AttributeError: 'module' object has no attribute 'init'
Question: I was running a simple python file:

    
    
    from livewires import games
    
    games.init(screen_width = 640, screen_height = 480, fps = 50)
    
    games.screen.mainloop()
    

When I run this in IDLE, I get the error printed in the title. I copy and
pasted this code from a book. I'm at the early stages of a beginner, so I
don't know much. I'm fairly sure that I installed livewires properly as i've
already run other programs with its modules. (gosh, I know that that is
probably not the right terminology at all, sorry.) I'm not exactly looking for
a way to fix this, (although that'd be nice, too) I'm just hoping someone
could explain exactly what the problem is. I copied the code from a book so I
don't understand what I did wrong. I'm 100% positive that there are no typos,
too.


Answer: Well, searching around, it seems that this is the livewires website:
[Livewires Home Page](http://www.livewires.org.uk/python/home) where one can
download their livewires package.

Also, some code from this: [Chapter
11](http://docs.google.com/viewer?a=v&q=cache%3aZJ_gR284T4gJ%3amendel.informatics.indiana.edu/~yye/lab/teaching/fall2011-I210/CH11-game.ppt%20python%20old%20livewires%201.0&hl=en&gl=ca&pid=bl&srcid=ADGEESi_RxkDDp3D4RCDcmJss5zXXwccsbWuFzAJPPikP87WbvrO6YaTL7hwnuhSQIANCuuxD5IQmvegLHepBIlVnOYYz62abQUd5s3OzFzjbXOPLU61rQIgHlnnptYj0gxdl6Sce2CI&sig=AHIEtbQM5-j4ux2HLpcWTZY4Csr5voR2Ug)
looks like what he's posted here ("The Pizza Panic Game").

Downloading and unpacking livewires shows that there is indeed no `init`
function in the games module (as the comments already mentioned).

Either this book has non-working examples (doubtful, given the depth it
explains this example with); or **the livewires package has changed between
when the book was written and now** (much more likely).

The livewires website has other examples on it which I think you'll have much
more success with.  
I'd recommend you ditch the book, since it's likely you'll keep running into
roadblocks like this. A Google search will turn up a number of other free
python tutorials which are more up-to-date, and will be easier to follow.

This page has a few links for beginners: [Beginners
Guide](http://wiki.python.org/moin/BeginnersGuide/NonProgrammers)

