ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dankil...@apache.org
Subject [6/6] incubator-ariatosca git commit: add docs to module
Date Wed, 19 Oct 2016 15:46:19 GMT
add docs to module


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/a19295c8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/a19295c8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/a19295c8

Branch: refs/heads/pylint-tools
Commit: a19295c8b8c250b2bce4fe6fd8ff1ce718e966cb
Parents: 481d729
Author: Dan Kilman <dankilman@gmail.com>
Authored: Wed Oct 19 16:08:32 2016 +0300
Committer: Dan Kilman <dankilman@gmail.com>
Committed: Wed Oct 19 16:53:08 2016 +0300

----------------------------------------------------------------------
 aria/tools/module.py | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a19295c8/aria/tools/module.py
----------------------------------------------------------------------
diff --git a/aria/tools/module.py b/aria/tools/module.py
index 535f7aa..3afc0ff 100644
--- a/aria/tools/module.py
+++ b/aria/tools/module.py
@@ -13,10 +13,19 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+"""
+Utility methods for dynamically loading python code
+"""
+
 import importlib
 
 
 def load_attribute(attribute_path):
+    """
+    Dynamically load an attribute based on the path to it.
+    e.g. some_package.some_module.some_attribute, will load the some_attribute from the
+    some_package.some_module module
+    """
     module_name, attribute_name = attribute_path.rsplit('.', 1)
     try:
         module = importlib.import_module(module_name)


Mime
View raw message