def ipython_setup(): """Perform additional ipython initialization""" import IPython import logging # make default imports ip = IPython.ipapi.get() ip.ex("from mrv.maya.all import *") # init logging logging.basicConfig(level=logging.INFO) # prefetch methods for convenience import mrv.maya.nt.typ as typ typ.prefetchMFnMethods()
def test_prefetch(self): global _prefetched if _prefetched: return st = time.time() nm = typ.prefetchMFnMethods() elapsed = time.time() - st _prefetched = True print >>sys.stderr, "Pre-fetched %i methods in %f s ( %f methods / s)" % ( nm, elapsed, nm / elapsed )
def test_prefetch(self): global _prefetched if _prefetched: return st = time.time() nm = typ.prefetchMFnMethods() elapsed = time.time() - st _prefetched = True print >> sys.stderr, "Pre-fetched %i methods in %f s ( %f methods / s)" % ( nm, elapsed, nm / elapsed)