Livewires and pygame

Paul Wright -$Paul$- at verence.demon.co.uk
Mon Dec 17 05:20:13 EST 2001


In article <3c1cd19e$0$10212$ba620e4c at news.skynet.be>,
Lorint Hendschel  <LorintHendschel at skynet.be> wrote:
># python
>Python 2.0 (#1, Apr 11 2001, 19:18:08)
>[GCC 2.96 20000731 (Linux-Mandrake 8.0 2.96-0.48mdk)] on linux-i386
>Type "copyright", "credits" or "license" for more information.
>>>> from livewires import beginners
>>>> from livewires import colour
>>>> from livewires import games
>
>At this stage, my interpreter just sits there and does no longer 
>respond to anything, I'm obliged to kill the terminal.
>
>I imported successively all "importable thingies" (sorry, I'm a newbie) 
>from the pygame directory (all files in *.pyc and *.so, e.g. from pygame 
>import mouse), and it worked.

Suggestion: are you able to run the pygame examples? That'll tell you
whether the problem is with the pygame install or the livewires one.

Also, you could try doing each of the following imports one after the
other at the Python command prompt:
pygame, pygame.image, pygame.mixer, pygame.font, pygame.transform 
pygame.draw 

They're all needed by the livewires.games module, so if one of them
hangs your python interpreter, that's where the problem lies.

The only other thing the games module then does on import is call
pygame.init (), so you could try that after you've done all the imports.

If all that works but you still can't import the livewires stuff, email
me at python at livewires.org.uk and I'll try to help further.

>Note that when I do:
>
>from livewire import *
>
>... it works, but then when I do a "dir(beginners)", I have a long list of 
>usable things, while "dir(games)" produces an error:

That's because "from livewires import *" imports the beginners module
only. It's a feature which exists for hysterical raisins. It's probably
quite useful to you because it means you can use the beginners' sheets
without attempting to invoke pygame, so you can learn from those before
moving on to the games.

-- 
----- Paul Wright ------| Set phasers to EVISCERATE.
-paul.wright at pobox.com--| 
http://pobox.com/~pw201 | 



More information about the Python-list mailing list