+#!/usr/bin/env python
+#
# Copyright 2004 Toby Dickenson
-# Copyright 2008-2010 W. Trevor King
+# Copyright 2008-2011 W. Trevor King
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
self._last_caller = None
modulefinder.ModuleFinder.__init__(self,*args,**kwargs)
- def import_hook(self, name, caller=None, fromlist=None):
+ def import_hook(self, name, caller=None, fromlist=None, level=-1):
old_last_caller = self._last_caller
try:
self._last_caller = caller
- return modulefinder.ModuleFinder.import_hook(self,name,caller,fromlist)
+ return modulefinder.ModuleFinder.import_hook(self,name,caller,fromlist, level)
finally:
self._last_caller = old_last_caller