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.
Well, searching around, it seems that this is the livewires website: Livewires Home Page where one can download their livewires package.
Also, some code from this: Chapter 11 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