Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class PathResolver(object):
- @inject(config=interfaces.Config, path=interfaces.Path)
- def __init__(self, config=Injected, path=Injected):
- self.path = path
- def __getattr__(self, name):
- return self.path('../ninjas/plugins')
- class NinjaBinder(InstanceBinder):
- def bind_path(self):
- from path import path
- def Path(user_path):
- return path(user_path)
- self.binder.bind(interfaces.Path, to_instance=Path)
Add Comment
Please, Sign In to add comment