add import tool
authorFelix Domke <tmbinc@elitedvb.net>
Thu, 15 Jun 2006 17:39:59 +0000 (17:39 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Thu, 15 Jun 2006 17:39:59 +0000 (17:39 +0000)
lib/python/Tools/Import.py [new file with mode: 0644]

diff --git a/lib/python/Tools/Import.py b/lib/python/Tools/Import.py
new file mode 100644 (file)
index 0000000..a46e1d3
--- /dev/null
@@ -0,0 +1,6 @@
+def my_import(name):
+       mod = __import__(name)
+       components = name.split('.')
+       for comp in components[1:]:
+               mod = getattr(mod, comp)
+       return mod