101
105
_real_import = __import__
103
def timed_import(name, globals=None, locals=None, fromlist=None, level=-1):
107
def timed_import(name, globals=None, locals=None, fromlist=None, level=None):
104
108
"""Wrap around standard importer to log import time"""
105
109
# normally there are 4, but if this is called as __import__ eg by
106
110
# /usr/lib/python2.6/email/__init__.py then there may be only one