[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] very slow pygame.init() under Snow Leopard



On 26/08/11 11:15 AM, René Dudfield wrote:


On Fri, Aug 26, 2011 at 8:10 PM, Lenard Lindstrom <len-l@xxxxxxxxx <mailto:len-l@xxxxxxxxx>> wrote:

    An exclude list for pygame.init() :

    pygame.init(exclude=['movie', ....])

    That is feasible. And with no keyword argument:

    pygame.init('display', 'mixer', ...)

    only those modules are initialized.

    pygame.init()

    would continue to initialize everything. If this looks good I will
    add it to the wish list.

    Lenard Lindstrom



Hi,

I think it's a good idea, except I don't see how it's much better than...

pygame.display.init()
pygame.mixer.init()

Which would be backwards compatible with older pygames.
Hi,

The "pygame.init('display', ...) is redundant. The exclude list would be useful for omitting an unused, costly, module. But in general I agree that calling init() only on those modules that are used is good programming practice. The Pygame examples should even be updated to reflect this. Using pygame.init() is much like "from pygame import *".

Lenard