Psyco Decorator
This will cause decorated functions to be run using the psyco optimizer. It will allow the code to continue working even if psyco is not available
Decorator:
Usage:
Decorator:
try: import psyco except: pass def optimize(func): try: return psyco.proxy(func) except: return func
Usage:
@optimize def complex_function(n): ... do complex stuff with n ...