Added a base presenter class
This commit is contained in:
parent
0763168367
commit
0c0238ee20
15
src/presenters/base.py
Normal file
15
src/presenters/base.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
from pubsub import pub
|
||||||
|
from interactors import configuration as interactor
|
||||||
|
|
||||||
|
class basePresenter(object):
|
||||||
|
|
||||||
|
def __init__(self, view, interactor, modulename):
|
||||||
|
self.interactor = interactor
|
||||||
|
self.view = view
|
||||||
|
self.interactor.install(view=view, presenter=self, modulename=modulename)
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
self.interactor.start()
|
||||||
|
self.interactor.uninstall()
|
Loading…
Reference in New Issue
Block a user