Beispiel #1
0
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()
Beispiel #2
0
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()
Beispiel #3
0
	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 )
Beispiel #4
0
 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)