https://github.com/graysonarts/little-module-loader
a little library for loading modules dynamically
https://github.com/graysonarts/little-module-loader
Last synced: 4 months ago
JSON representation
a little library for loading modules dynamically
- Host: GitHub
- URL: https://github.com/graysonarts/little-module-loader
- Owner: graysonarts
- Created: 2012-09-24T20:24:24.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2012-10-01T20:36:18.000Z (almost 13 years ago)
- Last Synced: 2024-12-30T08:27:13.277Z (6 months ago)
- Language: Python
- Size: 129 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
little-module-loader
====================a little library for loading modules dynamically
[](http://travis-ci.org/RussTheAerialist/little-module-loader)
[](http://coderwall.com/russtheaerialist)
Example Usage
=============Finding modules based on filename:
import little.module_loader
parent = "petit"
# this returns a dictionary that maps name of module (without parent) and the actual module object
dict(little.module_loader.find(parent, lambda x: x.endswith("_subsystem.py")))Finding all classes that are subclasses of another class:
# this returns a dictionary that maps the name of the class to the class object for instantiation
dict(class_finder("petit.packets", Packet))View the rest of the documentation here: http://packages.python.org/little.module_loader/