[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnue] r9825 - trunk/gnue-common/src/apps
From: |
johannes |
Subject: |
[gnue] r9825 - trunk/gnue-common/src/apps |
Date: |
Wed, 21 Nov 2007 08:09:00 -0600 (CST) |
Author: johannes
Date: 2007-11-21 08:08:59 -0600 (Wed, 21 Nov 2007)
New Revision: 9825
Modified:
trunk/gnue-common/src/apps/GImportLogger.py
Log:
PEP8-ification
Modified: trunk/gnue-common/src/apps/GImportLogger.py
===================================================================
--- trunk/gnue-common/src/apps/GImportLogger.py 2007-11-21 14:02:18 UTC (rev
9824)
+++ trunk/gnue-common/src/apps/GImportLogger.py 2007-11-21 14:08:59 UTC (rev
9825)
@@ -25,17 +25,46 @@
Importing this module causes all modules imported after this
to be printed to stdout
"""
-import os, ihooks, sys
+
+import ihooks
+
_import_indent = 0
+# =============================================================================
+# Hook into filesystem and interpreter
+# =============================================================================
+
class MyHooks(ihooks.Hooks):
+ """
+ Hook class for filesystem and interpreter
+ """
pass
+
+# =============================================================================
+# Module loader class
+# =============================================================================
+
class GImportLogger(ihooks.ModuleLoader):
+ """
+ Module loader class which prints all loaded modules to stdout
+ """
+ # -------------------------------------------------------------------------
+ # Load a given module
+ # -------------------------------------------------------------------------
+
def load_module(self, name, stuff):
+ """
+ Load the module 'name'
+
+ @returns: the loaded module
+ """
+
global _import_indent
+
print "." * _import_indent + "Importing %s..." % name
+
_import_indent += 1
module = ihooks.ModuleLoader.load_module(self, name, stuff)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnue] r9825 - trunk/gnue-common/src/apps,
johannes <=