|
|
@@ -11,13 +11,17 @@ indentLevel = 0
|
|
|
# The new import function
|
|
|
def newimport(*args, **kw):
|
|
|
global indentLevel
|
|
|
+ fPrint = 0
|
|
|
name = args[0]
|
|
|
# Only print the name if we have not imported this before
|
|
|
if not sys.modules.has_key(name):
|
|
|
print (" "*indentLevel + "import " + args[0])
|
|
|
+ fPrint = 1
|
|
|
indentLevel += 1
|
|
|
result = oldimport(*args, **kw)
|
|
|
indentLevel -= 1
|
|
|
+ if fPrint:
|
|
|
+ print (" "*indentLevel + "DONE: import " + args[0])
|
|
|
return result
|
|
|
|
|
|
# Replace the builtin import with our new import
|