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

Re: [pygame] PyGame slowdown



> Pysco combined with this decorator makes even more fun:
> http://blogs.nuxeo.com/sections/blogs/tarek_ziade/2005_09_24_yadi-part-2-simple-psyco-decorator


Yep, I use something similar, except I catch an ImportError, which
enables cross platformness with my Mac friends :-) I should probably
catch the TypeError as well.

def psycoize(func):
    try:
        import psyco
    except ImportError:
        return func
    return psyco.proxy(func)